2 Replies Latest reply: Jan 8, 2012 5:06 PM by Miguel Escaja RSS

JSP Portle

Miguel Escaja Newbie

Hi

 

I´ve got JBoss 6.0.0.Final packaged with GateIn 3.2 from trunk.

 

I have created a very simple Portlet web application with 3 jsp pages (FirstJspPortletProject_edit.jsp, FirstJspPortletProject_view.jsp and FirstJspPortletProject_help.jsp)

 

The FirstJspPortletProject_edit.jsp is defined as follows

 

<%@page contentType="text/html"%>

<%@page pageEncoding="UTF-8"%>

 

<%-- Uncomment below lines to add portlet taglibs to jsp

<%@ page import="javax.portlet.*"%>

<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix='c' %>

 

<portlet:defineObjects />

<%PortletPreferences prefs = renderRequest.getPreferences();%>

 

--%>

 

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix='c' %>

<b>

    FirstJspPortlet - VIEW MODE

</b>

 

The application sucessfully deploy to JBoss and I can get the Portet add to a new page in GateIn

So far so good

 

However as soon as I add the following line to FirstJspPortletProject_edit.jsp JBoss throws the exception below which I know why

 

<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet"%>

 

The uri http://java.sun.com/portlet_2_0 is defined in the portlet_2_0.tld which is in pc-portlet-2.3.0-GA.jar\META-INF\

 

the pc-portlet-2.3.0-GA.jar file is found at

 

\trunk\packaging\jboss-as6\pkg\target\jboss\server\default\deploy\gatein.ear\lib

 

so why it throws the exception when the taglig is deployed with GateIn?? the java stak trace suggest as if JBoss is unaware the pc-portlet-2.3.0-GA.jar exist. It might have something to do with the the CLASSPATH or something.

 

Exception thrown:

 

2012-01-06 18:14:29,919 ERROR [org.gatein.pc.container.com_escaja_portlets_FirstJspPortletProject] (http-127.0.0.1-8080-2) The portlet threw an exception: javax.portlet.PortletException: org.apache.jasper.JasperException: La uri absoluta: http://java.sun.com/portlet_2_0 no puede resolverse o en web.xml o el los archivos jar desplegados con esta aplicación

    at org.gatein.pc.portlet.impl.jsr168.api.PortletRequestDispatcherImpl.dispatch(PortletRequestDispatcherImpl.java:169) [:2.3.0-GA]

    at org.gatein.pc.portlet.impl.jsr168.api.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:79) [:2.3.0-GA]

    at com.escaja.portlets.FirstJspPortletProject.doView(FirstJspPortletProject.java:31) [:]

    at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:354) [:]

    at javax.portlet.GenericPortlet.render(GenericPortlet.java:259) [:]

    at org.gatein.pc.portlet.impl.jsr168.PortletContainerImpl$Invoker.doFilter(PortletContainerImpl.java:569) [:2.3.0-GA]

    at org.gatein.pc.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:159) [:2.3.0-GA]

    at org.exoplatform.portal.application.ApplicationMonitoringFilter.doFilter(ApplicationMonitoringFilter.java:77) [:3.2.0-CR01-SNAPSHOT]

    at org.gatein.pc.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:159) [:2.3.0-GA]

    at org.gatein.pc.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:80) [:2.3.0-GA]

    at org.gatein.pc.portlet.impl.jsr168.PortletContainerImpl.dispatch(PortletContainerImpl.java:506) [:2.3.0-GA]

    at org.gatein.pc.portlet.container.ContainerPortletDispatcher.invoke(ContainerPortletDispatcher.java:42) [:2.3.0-GA]

    at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:93) [:2.3.0-GA]

    at org.gatein.pc.portlet.aspects.EventPayloadInterceptor.invoke(EventPayloadInterceptor.java:197) [:2.3.0-GA]

    at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:93) [:2.3.0-GA]

    at org.gatein.pc.portlet.aspects.RequestAttributeConversationInterceptor.invoke(RequestAttributeConversationInterceptor.java:119) [:2.3.0-GA]

    at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:93) [:2.3.0-GA]

    at org.gatein.pc.portlet.aspects.CCPPInterceptor.invoke(CCPPInterceptor.java:65) [:2.3.0-GA]

    at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:93) [:2.3.0-GA]

    at org.gatein.pc.bridge.BridgeInterceptor.invoke(BridgeInterceptor.java:49) [:2.3.0-GA]

    at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:93) [:2.3.0-GA]

    at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:93) [:2.3.0-GA]

    at org.gatein.pc.portlet.aspects.SessionInvalidatorInterceptor.invoke(SessionInvalidatorInterceptor.java:55) [:2.3.0-GA]

    at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:93) [:2.3.0-GA]

    at org.gatein.pc.portlet.aspects.ContextDispatcherInterceptor.access$001(ContextDispatcherInterceptor.java:49) [:2.3.0-GA]

    at org.gatein.pc.portlet.aspects.ContextDispatcherInterceptor$1.doCallback(ContextDispatcherInterceptor.java:123) [:2.3.0-GA]

    at org.gatein.wci.command.CommandDispatcher$CallbackCommand.execute(CommandDispatcher.java:82) [:2.1.0-GA]

    at sun.reflect.GeneratedMethodAccessor1280.invoke(Unknown Source) [:1.6.0_30]

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_30]

    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_30]

    at org.gatein.wci.command.CommandServlet.doGet(CommandServlet.java:135) [:2.1.0-GA]

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [:1.0.0.Final]

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [:1.0.0.Final]

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.0.0.Final]

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]

    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:734) [:6.0.0.Final]

    at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:639) [:6.0.0.Final]

    at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:576) [:6.0.0.Final]

    at org.gatein.wci.command.CommandServlet.include(CommandServlet.java:84) [:2.1.0-GA]

    at org.gatein.wci.command.CommandDispatcher.include(CommandDispatcher.java:58) [:2.1.0-GA]

    at org.gatein.wci.jboss.JB6ServletContainerContext.include(JB6ServletContainerContext.java:92) [:2.1.0-GA]

    at org.gatein.wci.impl.DefaultServletContainer.include(DefaultServletContainer.java:271) [:2.1.0-GA]

    at org.gatein.pc.portlet.impl.spi.AbstractServerContext.dispatch(AbstractServerContext.java:69) [:2.3.0-GA]

    at org.gatein.pc.portlet.aspects.ContextDispatcherInterceptor.invoke(ContextDispatcherInterceptor.java:77) [:2.3.0-GA]

    at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:93) [:2.3.0-GA]

    at org.gatein.pc.portlet.aspects.SecureTransportInterceptor.invoke(SecureTransportInterceptor.java:69) [:2.3.0-GA]

    at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:93) [:2.3.0-GA]

    at org.gatein.pc.portlet.aspects.ValveInterceptor.invoke(ValveInterceptor.java:75) [:2.3.0-GA]

    at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:93) [:2.3.0-GA]

    at org.gatein.pc.portlet.container.ContainerPortletInvoker.invoke(ContainerPortletInvoker.java:131) [:2.3.0-GA]

    at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:93) [:2.3.0-GA]

    at org.gatein.pc.portlet.state.producer.ProducerPortletInvoker.invoke(ProducerPortletInvoker.java:249) [:2.3.0-GA]

    at org.gatein.pc.federation.impl.FederatedPortletInvokerService.invoke(FederatedPortletInvokerService.java:163) [:2.3.0-GA]

    at org.gatein.pc.federation.impl.FederatingPortletInvokerService.invoke(FederatingPortletInvokerService.java:244) [:2.3.0-GA]

    at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:93) [:2.3.0-GA]

    at org.gatein.pc.portlet.aspects.PortletCustomizationInterceptor.invoke(PortletCustomizationInterceptor.java:76) [:2.3.0-GA]

    at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:93) [:2.3.0-GA]

    at org.gatein.pc.portlet.aspects.ConsumerCacheInterceptor.invoke(ConsumerCacheInterceptor.java:165) [:2.3.0-GA]

    at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:93) [:2.3.0-GA]

    at org.exoplatform.portal.webui.application.UIPortlet.invoke(UIPortlet.java:1041) [:3.2.0-CR01-SNAPSHOT]

    at org.exoplatform.portal.webui.application.UIPortletLifecycle.processRender(UIPortletLifecycle.java:229) [:3.2.0-CR01-SNAPSHOT]

    at org.exoplatform.portal.webui.application.UIPortletLifecycle.processRender(UIPortletLifecycle.java:62) [:3.2.0-CR01-SNAPSHOT]

    at org.exoplatform.webui.core.UIComponent.processRender(UIComponent.java:144) [:3.2.0-CR01-SNAPSHOT]

    at org.exoplatform.portal.webui.workspace.UIPortalApplication.processRender(UIPortalApplication.java:681) [:3.2.0-CR01-SNAPSHOT]

    at org.exoplatform.portal.application.PortalRequestHandler.processRequest(PortalRequestHandler.java:184) [:3.2.0-CR01-SNAPSHOT]

    at org.exoplatform.portal.application.PortalRequestHandler.execute(PortalRequestHandler.java:150) [:3.2.0-CR01-SNAPSHOT]

    at org.exoplatform.web.WebAppController.service(WebAppController.java:349) [:3.2.0-CR01-SNAPSHOT]

    at org.exoplatform.portal.application.PortalController.onService(PortalController.java:127) [:3.2.0-CR01-SNAPSHOT]

    at org.exoplatform.container.web.AbstractHttpServlet.service(AbstractHttpServlet.java:132) [:2.3.2-GA]

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [:1.0.0.Final]

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.0.0.Final]

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]

    at org.exoplatform.web.login.RememberMeFilter.doFilter(RememberMeFilter.java:86) [:3.2.0-CR01-SNAPSHOT]

    at org.exoplatform.web.login.RememberMeFilter.doFilter(RememberMeFilter.java:54) [:3.2.0-CR01-SNAPSHOT]

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.0.0.Final]

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]

    at org.exoplatform.web.filter.ExtensibleFilter$ExtensibleFilterChain.doFilter(ExtensibleFilter.java:110) [:3.2.0-CR01-SNAPSHOT]

    at org.exoplatform.sample.ext.web.SampleFilter.doFilter(SampleFilter.java:46) [:3.2.0-CR01-SNAPSHOT]

    at org.exoplatform.web.filter.ExtensibleFilter$ExtensibleFilterChain.doFilter(ExtensibleFilter.java:106) [:3.2.0-CR01-SNAPSHOT]

    at org.exoplatform.web.filter.ExtensibleFilter.doFilter(ExtensibleFilter.java:80) [:3.2.0-CR01-SNAPSHOT]

    at org.exoplatform.web.filter.GenericFilter.doFilter(GenericFilter.java:79) [:3.2.0-CR01-SNAPSHOT]

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.0.0.Final]

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]

    at org.exoplatform.web.CacheUserProfileFilter.doFilter(CacheUserProfileFilter.java:73) [:3.2.0-CR01-SNAPSHOT]

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.0.0.Final]

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]

    at org.exoplatform.frameworks.jcr.web.ThreadLocalSessionProviderInitializedFilter.doFilter(ThreadLocalSessionProviderInitializedFilter.java:116) [:1.14.2-GA]

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.0.0.Final]

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]

    at org.exoplatform.services.security.web.SetCurrentIdentityFilter.doFilter(SetCurrentIdentityFilter.java:88) [:2.4.2-GA]

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.0.0.Final]

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]

    at org.exoplatform.web.login.ClusteredSSOFilter.doFilter(ClusteredSSOFilter.java:73) [:3.2.0-CR01-SNAPSHOT]

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.0.0.Final]

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]

    at org.exoplatform.container.web.PortalContainerFilter.doFilter(PortalContainerFilter.java:69) [:2.3.2-GA]

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.0.0.Final]

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]

    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [:6.0.0.Final]

    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [:6.0.0.Final]

    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.0.0.Final]

    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) [:6.0.0.Final]

    at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285) [:1.1.0.Final]

    at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261) [:1.1.0.Final]

    at org.exoplatform.web.login.PortalClusteredSSOSupportValve.invoke(PortalClusteredSSOSupportValve.java:120) [:3.2.0-CR01-SNAPSHOT]

    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.0.0.Final]

    at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100) [:6.0.0.Final]

    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [:6.0.0.Final]

    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.0.0.Final]

    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.0.0.Final]

    at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:416) [:6.0.0.Final]

    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.0.0.Final]

    at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.0.0.Final]

    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:6.0.0.Final]

    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [:6.0.0.Final]

    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654) [:6.0.0.Final]

    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:6.0.0.Final]

    at java.lang.Thread.run(Thread.java:662) [:1.6.0_30]

Caused by: org.apache.jasper.JasperException: La uri absoluta: http://java.sun.com/portlet_2_0 no puede resolverse o en web.xml o el los archivos jar desplegados con esta aplicación

    at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51) [:6.0.0.Final]

    at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409) [:6.0.0.Final]

    at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116) [:6.0.0.Final]

    at org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:239) [:6.0.0.Final]

    at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:152) [:6.0.0.Final]

    at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:386) [:6.0.0.Final]

    at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:448) [:6.0.0.Final]

    at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1398) [:6.0.0.Final]

    at org.apache.jasper.compiler.Parser.parse(Parser.java:130) [:6.0.0.Final]

    at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:255) [:6.0.0.Final]

    at org.apache.jasper.compiler.ParserController.parse(ParserController.java:103) [:6.0.0.Final]

    at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:196) [:6.0.0.Final]

    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:358) [:6.0.0.Final]

    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:338) [:6.0.0.Final]

    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:325) [:6.0.0.Final]

    at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:607) [:6.0.0.Final]

    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:312) [:6.0.0.Final]

    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326) [:6.0.0.Final]

    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253) [:6.0.0.Final]

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [:1.0.0.Final]

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.0.0.Final]

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]

    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:734) [:6.0.0.Final]

    at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:639) [:6.0.0.Final]

    at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:576) [:6.0.0.Final]

    at org.gatein.pc.portlet.impl.jsr168.api.PortletRequestDispatcherImpl.dispatch(PortletRequestDispatcherImpl.java:142) [:2.3.0-GA]

    ... 117 more

  • 1. Re: JSP Portle
    Ken Finnigan Master

    Miguel,

     

    As you don't appear to be using the PortletBridge in the portlet you describe, it would be better to post this to the GateIn forum.

     

    This forum is specifically for Portlets that require the PortletBridge to function.

     

    Thanks

    Ken

  • 2. Re: JSP Portle
    Miguel Escaja Newbie

    Hi Ken

     

    you´re right. I´ll keep that in mind next time it´s logged in the right forum.

     

    In the mean time I´ve found the cause of this issue which I´ll share for the benefit of others.

     

    In case you come across the issue above all you have to do is to add the following to the web.xml file

     

    <jsp-config>

        <taglib>

            <taglib-uri>http://java.sun.com/portlet_2_0</taglib-uri>

            <taglib-location>/WEB-INF/tld/portlet_2_0.tld</taglib-location>

        </taglib>

    </jsp-config>

     

    and then add the file portlet_2_0.tld into the /WEB-INF/tld folder of your web application project.

     

    If you´re running GateIn you can find the file portlet_2_0.tld packaged in the library pc-portlet-2.3.0-GA.jar

     

    Thanks Ken for your prompt response.