aspose file tools*
The moose likes Struts and the fly likes Struts error : Cannot get request dispatcher for path Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts error : Cannot get request dispatcher for path" Watch "Struts error : Cannot get request dispatcher for path" New topic
Author

Struts error : Cannot get request dispatcher for path

Adrian Ronayne
Greenhorn

Joined: Sep 13, 2006
Posts: 8
Hi,

I am trying to display a jsp form page usings struts but its not working.

Here is my jsp:
<html:form action="GDAddNewSimpleTextValue">
<jsp:include page="/WEB-INF/pages/newpage.jsp" flush="true" />
</html:form>

The corresponding entry in my struts-config.xml:
<action path="/addValue" type="com.sita.ats.revint.webcfg.action.myAction"
name="myForm"
scope="request"
validate="false"
input="inputForm">
<forward name="displayPage" path="inputForm" />
</action>

Im trying to display the page using:
mapping.findForward("displayPage");

But im receiving the error:
2006-11-22 16:25:21 - Ctx(/dld) : Status code:500 request:R( /dld + /addValue.do + null) msg:Cannot get request dispatcher for path
inputForm

Thanks for any help
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
The input attribute in an action mapping tells struts where to go if there is a validation problem. It must be an actual URL such as "/WEB-INF/pages/myPage.jsp". The path attribute of a forward must also be a URL. The entry "inputForm" in both of these places in your example is not valid.
[ November 22, 2006: Message edited by: Merrill Higginson ]

Merrill
Consultant, Sima Solutions
Adrian Ronayne
Greenhorn

Joined: Sep 13, 2006
Posts: 8
Thanks a million, that worked.

But how come the other entries in the struts-config file (which were not written by me) do not require the actual path to the jsp file?

Thanks again
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts error : Cannot get request dispatcher for path