FileNotFoundException for the Command button of a JSF 1.x portlet project on WebSphere Portal Server V8.0

Technote (troubleshooting)


Problem(Abstract)

A FileNotFoundException is thrown on the console when a command button (without any action specified) is clicked in the JSP file of a JSF 1.x portlet project on WebSphere Portal Server v8.0.

Symptom

In the JSP file of a JSF 1.x portlet project published on WebSphere Portal Server v8.0 when a command button(without action specified) is clicked, following exception is thrown on the console:

java.io.FileNotFoundException: JSPG0036E: Failed to find resource /.jsp
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.findWrapper(AbstractJSPExtensionProcessor.java:447)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.getServletWrapper(AbstractJSPExtensionProcessor.java:338)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:965)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:1384)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:548)
at com.ibm.ws.portletcontainer.core.impl.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:100)
at com.ibm.ws.portletcontainer.core.impl.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:237)
at com.ibm.faces.portlet.httpbridge.PortletRequestDispatcherWrapper.include(PortletRequestDispatcherWrapper.java:61)
at com.ibm.faces.portlet.httpbridge.PortletRequestDispatcherWrapper.forward(PortletRequestDispatcherWrapper.java:35)
at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:367)
at com.ibm.faces.portlet.httpbridge.PortletExternalContextWrapper.dispatch(PortletExternalContextWrapper.java:97)
at org.apache.myfaces.view.jsp.JspViewDeclarationLanguage.buildView(JspViewDeclarationLanguage.java:94)
at org.apache.myfaces.shared_impl.view.JspViewDeclarationLanguageBase.renderView(JspViewDeclarationLanguageBase.java:130)
at org.apache.myfaces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:263)
at com.ibm.faces.portlet.PortletViewHandlerImpl.renderView(PortletViewHandlerImpl.java:93)


Cause

Since the target action is not specified for command button, the target view state cannot be restored. Hence the exception is thrown on the console.


Resolving the problem

Specify an action for the Command button in the JSP file of a JSF 1.x portlet project.

The action can be defined as:

  • Specify a method for the action.

    That method should return an outcome.

  • Create a navigation rule for the outcome in the faces-config.xml file as:

             <navigation-rule>
<from-view-id>/FirstPage.jsp</from-view-id>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/NextPage.jsp</to-view-id>
</navigation-case>
</navigation-rule>

Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

Rational Application Developer for WebSphere Software
Portal / Portlet Development

Software version:

8.5, 8.5.1, 8.5.5, 9.0, 9.0.1, 9.1

Operating system(s):

Linux, Windows

Reference #:

1643823

Modified date:

2014-06-09

Translate my page

Machine Translation

Content navigation