aspose file tools*
The moose likes Struts and the fly likes Struts Validation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts Validation" Watch "Struts Validation" New topic
Author

Struts Validation

J Abraham
Ranch Hand

Joined: Jun 25, 2004
Posts: 101
Hi ,
In my application I am using single actionform for three JSP pages. I
want to validate the form and any error should come to the same jsp
page. I am using only one action tag for each action form. Also I am
passing some dynamic parameters to the JSP pages.

Struts-config supports only one JSP page as 'input' for one 'action' tag.
Can any body help me how to do this without making multiple action
forms.

Thanks in advance,


<b>J Abraham</b>
SCJP5,SCWCD1.4
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

Create multiple ActionMappings. Each mapping can use the same Action and/or ActionForm but with unique forwards and/or inputs. This will not create any more objects than you are already doing.


A good workman is known by his tools.
J Abraham
Ranch Hand

Joined: Jun 25, 2004
Posts: 101
Thank you for your reply.

But i am having another problem. I am passing some parameters dynamically to the actions, like users.do?method=edit&user_id=1. The user id is taken dynamically.

Thanks
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

so.... what's the problem?
J Abraham
Ranch Hand

Joined: Jun 25, 2004
Posts: 101
So, How can i pass values dynamically to the action input?

Thanks
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

request.getParameter();
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts Validation