It's not a secret anymore!*
The moose likes Struts and the fly likes The input attribute of the action tag not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "The input attribute of the action tag not working" Watch "The input attribute of the action tag not working" New topic
Author

The input attribute of the action tag not working

Abhay Katekar
Greenhorn

Joined: Jan 12, 2006
Posts: 11
I have set the input attribute of the action tag to point to a desired jsp.
This jsp is at the same location as my other jsp's.
But when the validate() method of my ActioForm is called upon error the jsp pointed to by the input attribute is not displayed.
Instead a blank page gets displayed.

Why is this happening.
My resource bundle is in the classes folder and named as ApplicationResources.properties.
The same name is configured in the struts-config.xml

What could be the problem.

Also if I remove the input attribute then the a message is displayed in the browser saying that "no input confitured"

Thanks
Abhay.
Travis Hein
Ranch Hand

Joined: Jun 06, 2006
Posts: 161
the blank screen from the result of validate() being called and you have an input in the struts configuration action mapping, can be caused when the value of the input="" attribute does not references a jsp file, there is a typo in the path or file name, or you have included the application context as part of the path. the jsp path should be refrenced from the web application without the context path in front of it.
for example, my input form is in /WEB-INF/jsp/input1.jsp
then i would have input="/WEB-INF/jsp/input1.jsp"

Other times may be when the input jsp file has an error and does not compile.

I have found too when my execute() method cannot find a forward, or if my action class does not implement the execute() method I also get just a blank screen with no error messgaes, but that is after the validate().


Error: Keyboard not attached. Press F1 to continue.
Abhay Katekar
Greenhorn

Joined: Jan 12, 2006
Posts: 11
Originally posted by Travis Hein:
the blank screen from the result of validate() being called and you have an input in the struts configuration action mapping, can be caused when the value of the input="" attribute does not references a jsp file, there is a typo in the path or file name, or you have included the application context as part of the path. the jsp path should be refrenced from the web application without the context path in front of it.
for example, my input form is in /WEB-INF/jsp/input1.jsp
then i would have input="/WEB-INF/jsp/input1.jsp"

Other times may be when the input jsp file has an error and does not compile.

I have found too when my execute() method cannot find a forward, or if my action class does not implement the execute() method I also get just a blank screen with no error messgaes, but that is after the validate().
Abhay Katekar
Greenhorn

Joined: Jan 12, 2006
Posts: 11
Originally posted by Travis Hein:
the blank screen from the result of validate() being called and you have an input in the struts configuration action mapping, can be caused when the value of the input="" attribute does not references a jsp file, there is a typo in the path or file name, or you have included the application context as part of the path. the jsp path should be refrenced from the web application without the context path in front of it.
for example, my input form is in /WEB-INF/jsp/input1.jsp
then i would have input="/WEB-INF/jsp/input1.jsp"

Other times may be when the input jsp file has an error and does not compile.

I have found too when my execute() method cannot find a forward, or if my action class does not implement the execute() method I also get just a blank screen with no error messgaes, but that is after the validate().



Thanks for the help.
I will check if there is a problem with the jsp compilation.
But I have earlier tried to use the input jsp value as a jsp which is already getting used but still that does not work.
Anyway will try again and get back.
Regards,
Abhay.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: The input attribute of the action tag not working