• Post Reply Bookmark Topic Watch Topic
  • New Topic

Regarding next page and previous page in jsp  RSS feed

 
Jyothsna Panchagnula
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a scenario where , I need to display registration page as stage 1, stage 2 , stage 3 till stage 5.
Now how do I track all the information from stage 1 to stage 5 so that the user data is not lost.
Like say fo eg: when the user is in stage 1 on click of next button he should be able to go to stage 2 .
On click of previous button , stage 1 .
I am using struts2 and jsp.

The registration page as a single page is very long so had to split it in terms of stages.

Please throw some inputs.

Thanks,
Jyothsna

 
Amit Ghorpade
Bartender
Posts: 2856
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You mean PaginationOrPaging?
 
Dawn Charangat
Ranch Hand
Posts: 249
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your requirement just needs to pick the cached data from browser cache and display it to the user [like mimicing the browser's forward and back button], then javascript can come to your rescue:

javascript:history.go(-1) // Place this in onclick event for 'back'
javascript:history.go(+1) // Place this in onclick event for 'forward'
 
Mohamed Inayath
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Store the values in Session and use appropriately.

 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dawn Charangat wrote:
javascript:history.go(-1) // Place this in onclick event for 'back'
javascript:history.go(+1) // Place this in onclick event for 'forward'


It is not a good idea .
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
seetharaman venkatasamy wrote:
Dawn Charangat wrote:
javascript:history.go(-1) // Place this in onclick event for 'back'
javascript:history.go(+1) // Place this in onclick event for 'forward'


It is not a good idea .

Not only is this not a good idea, it does not even address the actual question.

The JSP FAQ pointed to by Amit contains the appropriate solution.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!