0
votes

I'm using Liferay's latest community edition version which is 6.1.0-ce-ga1 with Tomcat 7.

Since this version, when I deploy my Liferay portlets, I often get this error.

Am I missing something ? For the non french speakers, it basically says that the JSP file is missing.

Infos :

  • My JSP file is located at /jsp/EditorPortlet.jsp
  • When using the dispatcher, I use /jsp/EditorPortlet.jsp as path
  • I don't get this error every time. If I redeploy my .war, sometimes it fixes the problem.

Relevant code :

PortletRequestDispatcher rd = getPortletContext().getRequestDispatcher(
            "/jsp/EditorPortlet.jsp"");
rd.include(request, response);

ERROR [render_portlet_jsp:154] javax.servlet.ServletException: Le fichier "/jsp/EditorPortlet.jsp" n'a pas été trouvé at org.apache.jasper.servlet.JspServlet.handleMissingResource(JspServlet.java:412) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:379) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:113) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:593) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:530) at com.liferay.portlet.PortletRequestDispatcherImpl.dispatch(PortletRequestDispatcherImpl.java:316) at com.liferay.portlet.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:134) at com.gui.portlet.Portlet.doViewPortlet(Portlet.java:194) at com.gui.portlet.Portlet.doView(Portlet.java:148) at com.app.management.model.server.portlet.Portlet.doView(Portlet.java:35) at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:328)

2

2 Answers

0
votes

By looking at exception trace, I think that you have created a portlet and in that particular portlet's Portlet.java class'doView() method, you are forwarding request to EditorPortlet.jsp, which is not created or missing.

If you haven't directly forwarded the request, then you must have put that part in your portlet.xml as one on the init-param (view-template)

0
votes

If your file is in /WEB-INF/jsp/EditorPortlet.jsp, you'd have to dispatch to that file, not to /jsp/EditorPortlet.jsp - did you try that?

Depending on the context from where you forward, it might work with jsp/EditorPortlet.jsp (note the missing root slash, just to try an explanation on why it might have worked earlier)

And, probably not the case here, but for completeness and as I just remembered this from ancient past:

I've seen tomcat honor the capitalization of filenames even on Windows. Since I'm no longer developing on windows for quite some time, I didn't care if the behaviour was configurable or not, but given that Windows doesn't honor capitalization it wasn't easy to change the name to "the same name" with different capital letters (back then I had to completely rename a file, then rename it to the correctly capitalized name).