| Author |
Alternative to post and getParameter
|
Don Kiddick
Ranch Hand
Joined: Dec 12, 2002
Posts: 580
|
|
Hi there, I've just started working on a JSP, I have very little experience. I am starting by refactoring what I have. Currently the jsp uses forms with textfields and a button. When the button gets pressed the values of the textfields can be retrieved via request.getParameter(<textfieldName> . Now ths ok for communicating within my jsps but it is limited to passing Strings. If I could somehow say, when button "a" is pressed fire bit of code "storeStateInSession", I could store objects in the session and this would be much more powerfull. Is this possible ? In a nutshell, I want do the JSP equivalent of adding a actionListener to a button. Tom [ January 09, 2003: Message edited by: Don Kiddick ]
|
 |
Kyle Brown
author
Ranch Hand
Joined: Aug 10, 2001
Posts: 3879
|
|
HTML and HTTP don't work that way. You can start the POST by doing JavaScript on the client, but a post is always going to carry strings from your form fields. Sorry, this ain't Swing. Kyle
|
Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
|
 |
Don Kiddick
Ranch Hand
Joined: Dec 12, 2002
Posts: 580
|
|
Thought that might be the answer. HTML is a quite limiting isn't it ? Would be very nice if you could use Swing components... oh well, time to get my hacking axe out ! thanks for the answer, T.
|
 |
 |
|
|
subject: Alternative to post and getParameter
|
|
|