File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes How to find value of 'input' in an action class? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to find value of Watch "How to find value of New topic

How to find value of 'input' in an action class?

Sanjay Virkar

Joined: Apr 03, 2005
Posts: 19
I want to use one action class to serve multiple jsp forms. I am sure this is a common need. For e.g. typically Registration form and Profile maintenance form take same data validation, manipulation only few things like error messages may change.

In my action class how can I find value of 'input' as defined in struts-config.xml file? Value of 'input' will tell me from which jsp form did the request came from and then based on that I can change error messages.

Of-course, I can set session variable in my jsps and check that in my action class but I am looking for solution where some api will tell me the value of 'input'.
danny liu
Ranch Hand

Joined: Jan 22, 2004
Posts: 185
I agree. Here's the link:
subject: How to find value of 'input' in an action class?
It's not a secret anymore!