Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Struts and the fly likes inputForward= Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "inputForward="true" not working" Watch "inputForward="true" not working" New topic

inputForward="true" not working

krishnamurthy bomma

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" />

<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(
at org.apache.catalina.core.ApplicationContextFacade.getRequestDispatcher(
at org.apache.struts.action.RequestProcessor.doForward(
at org.apache.struts.tiles.TilesRequestProcessor.doForward(
at org.apache.struts.action.RequestProcessor.processForwardConfig(
at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(
at org.apache.struts.action.RequestProcessor.process(
at org.apache.struts.action.ActionServlet.process(
at org.apache.struts.action.ActionServlet.doPost(
at javax.servlet.http.HttpServlet.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
Saji T.Sathian

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.

Saji T Sathian
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2904

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

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:
subject: inputForward="true" not working
jQuery in Action, 3rd edition