Package javax.servlet.jsp

Examples of javax.servlet.jsp.JspWriter


        //

        // FIXME: this code would be much simpler if we could just output the [pagename] and then use the
        // wiki engine to output the appropriate wikilink

        JspWriter out     = pageContext.getOut();
        int queueSize     = trail.size();
        String linkclass  = "wikipage";
        String curPage    = null;

        for( int i = 0; i < queueSize - 1; i++ )
        {
            curPage = trail.get(i);

            //FIXME: I can't figure out how to detect the appropriate jsp page to put here, so I hard coded Wiki.jsp
            //This breaks when you view an attachment metadata page
            out.print("<a class=\"" + linkclass + "\" href=\"" + m_wikiContext.getViewURL(curPage)+ "\">" + curPage + "</a>");

            if( i < queueSize - 2 )
            {
                out.print(m_separator);
            }
        }

        return SKIP_BODY;
    }
View Full Code Here


    {
        if( bodyContent != null )
        {
            try
            {
                JspWriter out = getPreviousOut();
                out.print(bodyContent.getString());
                bodyContent.clearBody();
            }
            catch( IOException e )
            {
                log.error("Unable to get inner tag text", e);
View Full Code Here

        //
        //  Finally, print out the correct link, according to what
        //  user commanded.
        //
        JspWriter out = pageContext.getOut();

        switch( m_format )
        {
          case ANCHOR:
            out.print("<a href=\""+m_wikiContext.getURL(WikiContext.EDIT,pageName, versionString)
                     +"\" accesskey=\"" + m_accesskey + "\" title=\"" + m_title + "\">");
            break;

          case URL:
            out.print( m_wikiContext.getURL(WikiContext.EDIT,pageName,versionString) );
            break;
        }

        return EVAL_BODY_INCLUDE;
    }
View Full Code Here

    {
        if( bodyContent != null )
        {
            try
            {
                JspWriter out = getPreviousOut();
                out.print(bodyContent.getString());
                bodyContent.clearBody();
            }
            catch( IOException e )
            {
                log.error("Unable to get inner tag text", e);
View Full Code Here

            }
        }

        if( engine.pageExists(pageName) )
        {
            JspWriter out = pageContext.getOut();

            String url = m_wikiContext.getURL( WikiContext.INFO, pageName );

            switch( m_format )
            {
              case ANCHOR:
                out.print("<a class=\"pageinfo\" href=\""+url+"\" accesskey=\""
                          + m_accesskey + "\" title=\"" + m_title + "\">");
                break;
              case URL:
                out.print( url );
                break;
            }

            return EVAL_BODY_INCLUDE;
        }
View Full Code Here

            PortalURL portalUrl =  portalEnv.createPortalURL();
            portalUrl.setPortletMode(evaluatedPortletId, new PortletMode(portletMode));

            // Print the mode anchor tag.
            try {
                JspWriter out = pageContext.getOut();
                out.print("<a href=\"");
                out.print(portalUrl.toString());
                out.print("\">");
                out.print("<span class=\"");
                out.print(portletMode);
                out.print("\"></span></a>");
            } catch (IOException ex) {
                throw new JspException(ex);
            }
        }
       
View Full Code Here

     */
    public int doStartTag() throws JspException {
        RenderResponse renderResponse = (RenderResponse) pageContext.getRequest()
            .getAttribute("javax.portlet.response");
        String namespace = renderResponse.getNamespace();
        JspWriter writer = pageContext.getOut();
        try {
            writer.print(namespace);
        } catch (IOException ioe) {
            throw new JspException(
                "Unable to write namespace", ioe
            );
        }
View Full Code Here

     * @return int
     */
    public int doEndTag() throws JspException {
        if (var == null) {
            try {
                JspWriter writer = pageContext.getOut();
                writer.print(url);
            } catch (IOException ioe) {
                throw new JspException(
                    "actionURL/renderURL Tag Exception: cannot write to the output writer.");
            }
        } else {
View Full Code Here

  StringBuffer results = new StringBuffer("<a href=\"");
  results.append(response.encodeURL(url.toString()));
  results.append("\">");

  // Print this element to our output writer
  JspWriter writer = pageContext.getOut();
  try {
      writer.print(results.toString());
  } catch (IOException e) {
      throw new JspException
    (messages.getMessage("linkUser.io", e.toString()));
  }
View Full Code Here

     */
    public int doEndTag() throws JspException {


  // Print the ending element to our output writer
  JspWriter writer = pageContext.getOut();
  try {
      writer.print("</a>");
  } catch (IOException e) {
      throw new JspException
          (messages.getMessage("link.io", e.toString()));
  }

View Full Code Here

TOP

Related Classes of javax.servlet.jsp.JspWriter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.