File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using ActionFormClass for multiple forms

 
Anurag Mishra
Ranch Hand
Posts: 121
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The mappings' name attribute is what you do.
 
Anurag Mishra
Ranch Hand
Posts: 121
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 121
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic