aspose file tools
The moose likes Struts and the fly likes inputForward= Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "inputForward="true" not working" Watch "inputForward="true" not working" New topic
Author

inputForward="true" not working

krishnamurthy bomma
Greenhorn

Joined: Nov 30, 2001
Posts: 10
I am working on web application which uses struts and tiles.
The problem i am facing is, controller is not forwarding to the page which i specified in the input attribute of the action tag. i am sepcifying local tiles name as the input attribute instead of relative jsp path.

I have specified inputForward="true" attribute in controller tag. For some reason struts is not evaluating actual URL from input attribute of the action element.

I really appreciate any kind of help in this regard.

Below is my struts configuration (spefic parts of my struts-config.xml)


<action path="/transferFunds" type="com.mycompany.controller.TransferAction" parameter="method" name="transferForm" scope="request" input="form">
<forward name="form" path="client.form"/>
<forward name="verify" path="client.verification" />
<forward name="confirm" path="cient.confirmation" />
</action>

<controller processorClass="com.mycompany.SecureRequestProcessor" nocache="true" inputForward="true" />

I am getting below exception message.

SEVERE: Servlet.service() for servlet action threw exception
java.lang.IllegalArgumentException: Path form does not start with a "/" character
at org.apache.catalina.core.ApplicationContext.getRequestDispatcher(ApplicationContext.java:368)
at org.apache.catalina.core.ApplicationContextFacade.getRequestDispatcher(ApplicationContextFacade.java:196)
at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1078)
at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)
at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:318)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
Saji T.Sathian
Greenhorn

Joined: Nov 27, 2008
Posts: 7
I am facing the same problem and unable to solve.If you could solve it by now , please post a replay.

Thanks
Saji T Sathian
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2896
    
    1

Please post the JSP page where you call this Action class. On which JSP page you are getting this error ?


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Saji T.Sathian
Greenhorn

Joined: Nov 27, 2008
Posts: 7
This kind of problem comes only when multiple modules are involved.Otherwise everything works fine.Jsp s generally contains a form and submited to an action(TransferAction) in the same module ,but the control will be transfered to a processing action in a different module through a switchAction.And during the processing if error comes the control would be forwarded back to the same JSP(in the initial module)
using 'input' attribute of the Action Element(Of processing Action).
Then all the problems appear.It throws the exceptions mentioned in the
previous posts.

This problem I faced while using Struts 1.1 . With out getting any solution I changed the way of implementation.

Saji T Sathian
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: inputForward="true" not working
 
Similar Threads
Bacis doubt input property in struts-config.xml
Probelom in Manual Validation method
Path for Tile Does Not Start With a "/" Character
Getting problem in struts
Error - tag.getAsString : attribute 'title' not found in context.