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

Single ActionClass for Two forms

 
Anurag Mishra
Ranch Hand
Posts: 121
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I want to use a single ActionClass for two forms defined in two jsp.

Say form1 is defined in jsp1
form2 is defined in jsp2.

Here Jsp1 is header and when jsp1 is called it calls jsp2 also.

I wrote two different methods to call from two different Jsp's, both methods are called.

But when I am calling the method for JSP2 whihc sets some Button visible/Invisible it sets, but again since first jsp1 calls the other metods it doesn't stores the properties set by previous method.

If anyone has idea how to keep properties set, please tell me.

thanks in advance.

//Action Maping

<action path="/Page1"
type="StandardsDispatchAction"
name="firstForm"
scope="session"
validate="false"
parameter="method">
<forward name="success" path="/Header.jsp"/>
<forward name="failure" path="errorpage.jsp"/>
</action>

<action path="/Page2"
type="StandardsDispatchAction"
name="secondForm"
scope="session"
validate="false"
parameter="method">
<forward name="success" path="/child.jsp"/>
<forward name="failure" path="errorpage.jsp"/>
</action>
 
Anurag Mishra
Ranch Hand
Posts: 121
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Please ignore this post,there was a problem with scope of Session, So
I had problem.

thanks a lot.
Anurag
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic