Package javax.servlet.jsp

Examples of javax.servlet.jsp.JspException


                    portletName = currentPortletName;
                }

                if ( portletName == null )
                {
                    throw new JspException( "No portlet to render" );
                }

                HttpServletResponse response = ( HttpServletResponse ) pageContext.getResponse(  );
                PortletApplication  container = getPortletContainer(  );
                PortletProxy        proxy = ( PortletProxy ) getPortletContainer(  ).getPortlet( portletName );
                PortletRequestImpl  req = new PortletRequestImpl( proxy, request, container.getPortletServiceFactory(  ) );
                PortletResponseImpl resp = new PortletResponseImpl( proxy, req, response );
               
                PageTag page = (PageTag)findAncestorWithClass( this, PageTag.class );
                if ( page == null )
                {
                  throw new JspException( "'portlet' tag MUST be inside a 'page' tag");
                }
                _portletPageContext.setSkinContextPath( page.getSkinContextPath());

                req.setPageContext( _portletPageContext );
                proxy.service( req, resp );
                pageContext.getOut(  ).println( resp.getBuffer(  ).toString(  ) );
            }

            return EVAL_PAGE;
        }
        catch ( IOException io )
        {
            __log.error( "IO error while rendering the portlet", io );
            __log.error( "===============================================" );
            throw new JspException( io );
        }
        catch ( PortletException e )
        {
            __log.error( "Unexpected error while rendering the portlet", e );
            __log.error( "===============================================" );
            throw new JspException( e );
        }
    }
View Full Code Here


    PanelsSupport support = PanelsSupport.getInstance(pageContext);
    context = support.getContext(pageContext);

    ListConfig list = context.lookupListConfig(name);
    if (list == null) {
      throw new JspException("Could not get list " + name);
    }
    items = new ListStatus(list);
    if (varStatus != null) {
        pageContext.setAttribute(varStatus, items);
    }
View Full Code Here

    PanelsSupport support = PanelsSupport.getInstance(pageContext);
    context = support.getContext(pageContext);

    panel = context.lookupPanelConfig(name);
    if (panel == null) {
      throw new JspException("Could not get panel " + name);
    }

    return EVAL_BODY_BUFFERED;
  }
View Full Code Here

    if (log.isTraceEnabled())
      log.trace("panel " + name);
   
    String template = panel.findTemplate(context.getLocale());
    if (template == null) {
      throw new JspException("Could not get dispatch path for panel " + panel.toInlineString());
    }
    if (log.isDebugEnabled())
      log.debug("include " + template);

//    log.debug("push " + name);
    context.push(panel);
    if (params != null) {
      for (int i = 0; i < params.size(); i++) {
        context.addParamConfig((DynamicParamConfig)params.get(i));
      }
    }
    try {
      pageContext.include(template);
    } catch (Exception e) {
      throw new JspException("Failed to include template " + template, e);
    } finally {
//      log.debug("pop " + name);
      context.pop();
     
      release();
View Full Code Here

    if (log.isTraceEnabled())
      log.trace("param " + name);

    PanelTag panel = (PanelTag)findAncestorWithClass(this, PanelTag.class);
    if (panel == null) {
      throw new JspException("param tag must be nested in panel tag!");
    }
    panel.add(new DynamicParamConfig(name, value));

    return EVAL_PAGE;
  }
View Full Code Here

          if (key == null && name != null) {
              // Look up the requested property value
              Object value = TagUtils.getInstance().lookup(pageContext, name, property, scope);
              if (value != null && !(value instanceof String)) {
                  JspException e =
                      new JspException(messages.getMessage("message.property", key));
                 TagUtils.getInstance().saveException(pageContext, e);
                  throw e;
              }
              displayText = (String) value;
          }
View Full Code Here

        String entryTitle = null;
        if (entryTitleKey != null) {
            entryTitle = TagUtils.getInstance().message(pageContext, getBundle(), getLocale(), entryTitleKey, new String[] {});

            if (entryTitle == null) {
                JspException e = new JspException(messages.getMessage("message.message", "\"" + entryTitleKey + "\""));
                TagUtils.getInstance().saveException(pageContext, e);
                throw e;
            }
        }
View Full Code Here

      (HttpServletRequest) pageContext.getRequest(),
      "");
    StringBuffer buf = new StringBuffer();
    Panel p = panelId == null ? null : PanelManager.getInstance().getPanel(panelId);
    if (p == null && getStyleId() == null) {
      throw new JspException("Frame tag requires either panelId or styleId attributes");
    }
    String frameState = CoreUtil.getCookieValue("frame_" + getStyleId(),
      (HttpServletRequest) pageContext.getRequest(),
      p != null ? p.getDefaultFrameState() : FRAME_NORMAL);
    buf.append("<div ");
View Full Code Here

        String sourceTitle = null;
        if (sourceTitleKey != null) {
            sourceTitle = TagUtils.getInstance().message(pageContext, getBundle(), getLocale(), sourceTitleKey, new String[] {});

            if (sourceTitle == null) {
                JspException e = new JspException(messages.getMessage("message.message", "\"" + sourceTitleKey + "\""));
                TagUtils.getInstance().saveException(pageContext, e);
                throw e;
            }
        }
View Full Code Here

                getLocale(),
                showPersonalPoliciesKey,
                new String[] { });
           
            if (showPersonalPolicies == null) {
                JspException e =
                    new JspException(
                        messages.getMessage("message.message", "\"" + showPersonalPoliciesKey + "\""));
                TagUtils.getInstance().saveException(pageContext, e);
                throw e;
            }
            return showPersonalPolicies;
View Full Code Here

TOP

Related Classes of javax.servlet.jsp.JspException

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.