Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

applet and jsp - retain values in applet ?? PLEASE HELP!

 
v fox
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello --
I have an applet living in a browser. When the user selects an item out of a specific combo box, the browser should then redirect to the jsp specified in the selected item. When the user has finished entering all info in the jsp, the browser needs to return to the initial page that has the applet. Now that the applet is again visible, it needs to display all the data that was originally entered in the form (textfield values, radio button and combo box selections, etc). How do I do this? From my understanding, applets do not maintain state between browser pages. Also, I thought of using a java bean to retain the applet values, but I can't seem to get the bean to stay alive when it gets to the selected jsp page, much less to pass the bean back to the applet. The business owner is adament that the applet should not start a new browser for the jsp, but that the browser should redirect the user from the applet to the jsp and then back to the applet. Does anyone know how I can accomplish this task?
Many thanks in advance.
 
Selva P
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
your problem can be divided into two
1) Calling a jsp page based on the item selected in an applet can be done using the URL class in java.net.* package.
2) The state of an applet can be maintained using the <param name = **** value=***> tag in an applet.
This tag can be dynamically generated by a jsp page so that it contains all the selected details. your applet can read from these parameters and set the values in its components accordingly..
hope this solves

 
v fox
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to keep the instance of the applet alive somehow so that it does not have to be recreated? The applet is very slow in coming to life, which is acceptable if it only happens the first time the user brings up the applet. However, this application is used in a call center where the length of the phone call with the customer needs to be kept to the extreme minimum. Loading the applet again each time is not acceptable. Is there some way that I can have the applet call the jsp, and when the user is finished with the jsp to return to the same instance of the applet? Is there a way to cache the applet with the search values saved so that the browser could return to this applet without redoing all that work?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic