aspose file tools*
The moose likes Struts and the fly likes Help needed to use the scope interceptor for a wizard Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Help needed to use the scope interceptor for a wizard" Watch "Help needed to use the scope interceptor for a wizard" New topic
Author

Help needed to use the scope interceptor for a wizard

Celinio Fernandes
Ranch Hand

Joined: Jun 28, 2003
Posts: 547

Hi,
I am trying to implement a wizard form in Struts 2, using the SCOPE INTERCEPTOR.

That wizard is used to register a new user.
I have 3 pages :
In the first page, the user chooses a login and a password.
In the second page, the user enters his phone number, age, first name, name, fax.
In the third page, the user enters his adress details : country, street name, street number, post code.

There is one final action that is launched when the user clicks on SUBMIT in the third page.
This action should get all the information entered in the 3 pages and insert it into the database.

So far is what i have got :



First page : login.jsp

Second page : nouvUtilisateur.jsp
third page : nouvAdresse.jsp
Here is what i got in struts.xml :

As i commented out inside struts.xml, i am a bit lost with what i should put inside the interceptor-ref tag.
There is little documentation and samples about its use.

Do i need getters and setters in my action(s) for every attribute (fields in my pages) that i want to carry on until the final page ?
Also, what exactly are the advantages of the SCOPE interceptor ?



Thanks for helping.


SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCBCD 5
Visit my blog
 
 
subject: Help needed to use the scope interceptor for a wizard