File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Using ActionFormClass for multiple forms Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Using ActionFormClass for multiple forms" Watch "Using ActionFormClass for multiple forms" New topic
Author

Using ActionFormClass for multiple forms

Anurag Mishra
Ranch Hand

Joined: Jun 16, 2003
Posts: 121
Hi,

Can anyone tell is there a way to Use same ActionForm Class from different forms(JSP pages).

I used the mapping's name property and tried to do this, But is there
any other Efficient way to do this?.

Plese write if you know.

thanks
Anurag


SCJP 1.2
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

The mappings' name attribute is what you do.


A good workman is known by his tools.
Anurag Mishra
Ranch Hand

Joined: Jun 16, 2003
Posts: 121
yes, i just differentiate the logic based on mapping's name in such a way

String formName = mapping.getName();

if(formName.equals("firstForm"))
{

}
Anurag Mishra
Ranch Hand

Joined: Jun 16, 2003
Posts: 121
yes, i just differentiate the logic based on mapping's name in such a way

String formName = mapping.getName();

if(formName.equals("firstForm"))
{
//do something
}
else if(formName.equals("secondForm"))
{
//do somethig Extra

}

thanks
Anurag
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using ActionFormClass for multiple forms