• Post Reply Bookmark Topic Watch Topic
  • New Topic

View State  RSS feed

 
Kishore Shewani
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are the various ways to maintain view state while transferring control between various web components.
Like if application involves controler servlets which are used to redirect flow between different views(jsp), what are the ways by which i can maintain the view states.

( I am aware of using session object for this ).
As a curosity i would like to know why JavaRanch pages use cgi ( and not other middleware technologies like jsp/ servlets? what is the trade-off involved ? )
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Controlling view state
I think that depends on how complex your collection of states and the transitions between them are. Drawing a diagram is a good way to start.
In my mock exam servlet, state transitions are very simple in that every state transition results from a form submission - hidden variables in the form can be used by the servlet to recover the present state, and the selected options control the transition.
Why cgi-bin
Why not? it works! No need to be trendy and apply the latest gizmos if you have something that works.
Bill
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!