JSPG0036E: 无法找到 Liferay 4.3 的资源 /WEB-INF/servlet/view 错误 + Websphere 中的 Spring Portlet
我能够在 websphere 6.1 和 7.0 版本中成功部署 liferay。
另外,我使用 spring portlet mvc 开发的 portlet 也列在添加内容中。
我正在使用 spring 框架的以下视图解析器将控件路由到相应的 portlet jsps
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
<property name="prefix" value="/WEB-INF/html/"/>
<property name="suffix" value=".jsp"/>
</bean>
当我在页面下包含我的 portlet 时,我收到以下错误,该错误与未正确找到视图(即 jsp)有关...但我能够调试并看到我的控制器被正确调用并且视图名称也被返回。
相同的设置在 Jboss 中运行良好,如果我缺少任何特定于 websphere 的内容,请帮助...
提前致谢...期待您的回复
JSP 处理错误 HTTP 错误代码:404
错误消息:JSPG0036E:找不到资源 /WEB-INF/servlet/视图
根本原因:java.io.FileNotFoundException:JSPG0036E:找不到 资源/WEB-INF/servlet/查看 com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.findWrapper(AbstractJSPextensionProcessor.java:376) 在 com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.handleRequest(AbstractJSPExtensionProcessor.java:336) 在 com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:673) 在 org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:137) 在 org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:251) 在 org.springframework.web.servlet.ViewRendererServlet.renderView(ViewRendererServlet.java:111) 在 org.springframework.web.servlet.ViewRendererServlet.processRequest(ViewRendererServlet.java:84) 在 org.springframework.web.servlet.ViewRendererServlet.doGet(ViewRendererServlet.java:65) 在 javax.servlet.http.HttpServlet.service(HttpServlet.java:718) 处 javax.servlet.http.HttpServlet.service(HttpServlet.java:831) 在 com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1655) 在 com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:937) 在 com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:500) 在 com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178) 在 com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:673) 在 com.liferay.portlet.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:245) 在 com.liferay.portlet.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:87) 在 org.springframework.web.portlet.DispatcherPortlet.render(DispatcherPortlet.java:1081) 在 org.springframework.web.portlet.DispatcherPortlet.doRenderService(DispatcherPortlet.java:811) 在 org.springframework.web.portlet.FrameworkPortlet.processRequest(FrameworkPortlet.java:475) 在 org.springframework.web.portlet.FrameworkPortlet.doDispatch(FrameworkPortlet.java:445) 在 javax.portlet.GenericPortlet.render(GenericPortlet.java:233) 处 com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:107) 在 javax.servlet.http.HttpServlet.service(HttpServlet.java:831) 处 com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1655) 在 com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:937) 在 com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:500) 在 com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178) 在 com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:673) 在 com.liferay.portlet.CachePortlet._invoke(CachePortlet.java:354) 处 com.liferay.portlet.CachePortlet.render(CachePortlet.java:201)位于 com.ibm._jsp._render_5F_portlet._jspService(_render_5F_portlet.java:1324) 在 com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:98) 处 javax.servlet.http.HttpServlet.service(HttpServlet.java:831) 在 com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1655) 在 com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1595) 在 com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:104) 在 com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77) 在 com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908) 在 com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:932) 在 com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:500) 在 com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178) 在 com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:121) 在 com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:239) 在 com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:673) 在 com.liferay.portal.util.PortalUtil.renderPortlet(PortalUtil.java:1517) 在 com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processPortlet(RuntimePortletUtil.java:165) 在 com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processPortlet(RuntimePortletUtil.java:102) 在 com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processTemplate(RuntimePortletUtil.java:270) 在 com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processTemplate(RuntimePortletUtil.java:189) 在 com.ibm._jsp._portlet._jspService(_portlet.java:762) 处 com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:98) 位于 javax.servlet.http.HttpServlet.service(HttpServlet.java:831) 在 com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1655) 在 com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1595) 在 com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:104) 在 com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77) 在 com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908) 在 com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:932) 在 com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:500) 在 com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178) 在 com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:121) 在 com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:239) 在 com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:673) 在 com.liferay.portal.action.LayoutAction.includeLayoutContent(LayoutAction.java:291) 在 com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:174) 在 org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) 在 org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) 在 com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:157) 在 org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) 在 org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) 在 javax.servlet.http.HttpServlet.service(HttpServlet.java:718) 处 com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:287) 在 com.liferay.portal.servlet.MainServlet.service(MainServlet.java:522) 在 javax.servlet.http.HttpServlet.service(HttpServlet.java:831) 处 com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1655) 在 com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1595) 在 com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:104) 在 com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77) 在 com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908) 在 com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:932) 在 com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:500) 在 com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178) 在 com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:341) 在 com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:130) 在 javax.servlet.http.HttpServlet.service(HttpServlet.java:831) 处 com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1655) 在 com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1595) 在 com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131) 在 com.liferay.filters.strip.StripFilter.doFilter(StripFilter.java:92) 在 com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188) 在 com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116) 在 com.liferay.filters.compression.CompressionFilter.doFilter(CompressionFilter.java:122) 在 com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188) 在 com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116) 在 com.liferay.filters.secure.SecureFilter.doFilter(SecureFilter.java:144) 在 com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188) 在 com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116) 在 com.liferay.filters.doubleclick.DoubleClickFilter.doFilter(DoubleClickFilter.java:135) 在 com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188) 在 com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116) 在 com.liferay.portal.servlet.filters.layoutcache.LayoutCacheFilter.doFilter(LayoutCacheFilter.java:188) 在 com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188) 在 com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116) 在 com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.doFilter(AutoLoginFilter.java:117) 在 com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188) 在 com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116) 在 com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.doFilter(VirtualHostFilter.java:166) 在 com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188) 在 com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116) 在 com.liferay.portal.servlet.filters.sessionid.SessionIdFilter.doFilter(SessionIdFilter.java:85) 在 com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188) 在 com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116) 在 com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77) 在 com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908) 在 com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:932) 在 com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:500) 在 com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178) 在 com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91) 在 com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:864) 在 com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583) 在 com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186) 在 com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455) 在 com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384) 在 com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83) 在 com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) 在 com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) 在 com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) 在 com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138) 处 com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204) 位于 com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775) 在 com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905) 处 com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1550)
I was able to successfully deploy liferay in both websphere 6.1 and 7.0 version.
Also my portlets which are developed using spring portlet mvc are listed in add content.
I am using the following view resolver of spring framework to route the control to respective portlet jsps
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
<property name="prefix" value="/WEB-INF/html/"/>
<property name="suffix" value=".jsp"/>
</bean>
When I include my portlet under the page, I get the following error which is related to not finding the view(i.e jsp) properly... but I was able to debug and see that my controller is getting called properly and view name was also returned.
The same set up works fine in Jboss, please help if I am missing anything specific to websphere...
Thanks in advance... Expecting your responses
JSP Processing Error HTTP Error Code: 404
Error Message: JSPG0036E: Failed to find resource
/WEB-INF/servlet/viewRoot Cause: java.io.FileNotFoundException: JSPG0036E: Failed to find
resource /WEB-INF/servlet/view at
com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.findWrapper(AbstractJSPExtensionProcessor.java:376)
at
com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.handleRequest(AbstractJSPExtensionProcessor.java:336)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:673)
at
org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:137)
at
org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:251)
at
org.springframework.web.servlet.ViewRendererServlet.renderView(ViewRendererServlet.java:111)
at
org.springframework.web.servlet.ViewRendererServlet.processRequest(ViewRendererServlet.java:84)
at
org.springframework.web.servlet.ViewRendererServlet.doGet(ViewRendererServlet.java:65)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:718) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:831) at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1655)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:937)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:500)
at
com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:673)
at
com.liferay.portlet.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:245)
at
com.liferay.portlet.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:87)
at
org.springframework.web.portlet.DispatcherPortlet.render(DispatcherPortlet.java:1081)
at
org.springframework.web.portlet.DispatcherPortlet.doRenderService(DispatcherPortlet.java:811)
at
org.springframework.web.portlet.FrameworkPortlet.processRequest(FrameworkPortlet.java:475)
at
org.springframework.web.portlet.FrameworkPortlet.doDispatch(FrameworkPortlet.java:445)
at javax.portlet.GenericPortlet.render(GenericPortlet.java:233) at
com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831) at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1655)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:937)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:500)
at
com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:673)
at com.liferay.portlet.CachePortlet._invoke(CachePortlet.java:354) at
com.liferay.portlet.CachePortlet.render(CachePortlet.java:201) at
com.ibm._jsp._render_5F_portlet._jspService(_render_5F_portlet.java:1324)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:98) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:831) at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1655)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1595)
at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:104)
at
com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:932)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:500)
at
com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at
com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:121)
at
com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:239)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:673)
at
com.liferay.portal.util.PortalUtil.renderPortlet(PortalUtil.java:1517)
at
com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processPortlet(RuntimePortletUtil.java:165)
at
com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processPortlet(RuntimePortletUtil.java:102)
at
com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processTemplate(RuntimePortletUtil.java:270)
at
com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processTemplate(RuntimePortletUtil.java:189)
at com.ibm._jsp._portlet._jspService(_portlet.java:762) at
com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:98) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:831) at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1655)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1595)
at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:104)
at
com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:932)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:500)
at
com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at
com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:121)
at
com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:239)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:673)
at
com.liferay.portal.action.LayoutAction.includeLayoutContent(LayoutAction.java:291)
at
com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:174)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at
com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:157)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:718) at
com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:287)
at
com.liferay.portal.servlet.MainServlet.service(MainServlet.java:522)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831) at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1655)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1595)
at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:104)
at
com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:932)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:500)
at
com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:341)
at
com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:130)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831) at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1655)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1595)
at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131)
at com.liferay.filters.strip.StripFilter.doFilter(StripFilter.java:92)
at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
at
com.liferay.filters.compression.CompressionFilter.doFilter(CompressionFilter.java:122)
at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
at
com.liferay.filters.secure.SecureFilter.doFilter(SecureFilter.java:144)
at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
at
com.liferay.filters.doubleclick.DoubleClickFilter.doFilter(DoubleClickFilter.java:135)
at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
at
com.liferay.portal.servlet.filters.layoutcache.LayoutCacheFilter.doFilter(LayoutCacheFilter.java:188)
at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
at
com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.doFilter(AutoLoginFilter.java:117)
at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
at
com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.doFilter(VirtualHostFilter.java:166)
at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
at
com.liferay.portal.servlet.filters.sessionid.SessionIdFilter.doFilter(SessionIdFilter.java:85)
at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
at
com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:932)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:500)
at
com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at
com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91)
at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:864)
at
com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
at
com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at
com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138) at
com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204) at
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905) at
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1550)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
找到解决方案 :) :-
扩展 spring DispatcherPortlet 类并编写您自己的自定义 portlet 类。
重写render方法,大部分实现与基类render方法实现相同。
在方法末尾添加这些行 -
注意:不要忘记在 portlet.xml 中为您的 portlet 配置自定义 portlet 类。
希望它对你也有用。
Solution Found :) :-
Extend the spring DispatcherPortlet class and write your own custom portlet class.
Override the render method, most of the implementation is same as base class render method implementation.
Add these lines at the end of the method -
Note : dont forget to configure your custom portlet class in portlet.xml for your portlets.
Hope its useful for you too.
当进行 servlet 转发调用而不是 servlet include 时,在较新版本中也会出现此错误。
例如,我在 WebSphere 8.5 上使用 Apache Tiles 2 和 Spring Portlet MVC 4.3 观察到了这一点。在这种情况下,如果您使用 Spring 的 viewResolver bean,您可以将其配置为强制包含 servlet:
请注意,Spring MVC 4.3 中不推荐使用 Tiles 2 支持。我只是添加了这个解决方案,以防有人在使用现有代码时遇到问题。
对于 Tiles,另一种方法是手动强制 servlet-include。您需要将请求属性
ServletUtil.FORCE_INCLUDE_ATTRIBUTE_NAME
设置为true
。但是,我不知道如果您在 portlet 请求中设置它是否有效,因为 portlet 请求属性可能不再在 servlet 请求中可用。据我所知,没有正式的方法可以从 portlet 请求对象获取 servlet 请求对象。因此,这里有人建议为“*.tiles”创建一个设置属性的 servlet 过滤器。不过,我没有尝试这个。This error also occurs in newer versions when a servlet forward call is made instead of a servlet include.
I observed this using Apache Tiles 2 and Spring Portlet MVC 4.3 on WebSphere 8.5 for example. In this case -if you are using Spring's
viewResolver
bean you can configure it to force a servlet-include:Notice that Tiles 2 support is deprecated in Spring MVC 4.3. I just added this solution in case someone has trouble with existing code.
Regarding Tiles, another way is to force the servlet-include manually. You need to set the request attribute
ServletUtil.FORCE_INCLUDE_ATTRIBUTE_NAME
totrue
. However, I don't know if this works if you set it in the portlet request as the portlet request attributes might not be available in the servlet request anymore. As far as I know there is no official way to get the servlet request object from the portlet request object. Thus, here someone suggests to create a servlet filter for "*.tiles" that sets the attribute. I didn't try this, however.