• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Single ActionClass for Two forms

 
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic