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 Single ActionClass for Two forms Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Single ActionClass for Two forms" Watch "Single ActionClass for Two forms" New topic
Author

Single ActionClass for Two forms

Anurag Mishra
Ranch Hand

Joined: Jun 16, 2003
Posts: 121
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>


SCJP 1.2
Anurag Mishra
Ranch Hand

Joined: Jun 16, 2003
Posts: 121
Hi All,

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

thanks a lot.
Anurag
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Single ActionClass for Two forms