• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Alternative to post and getParameter

 
Don Kiddick
Ranch Hand
Posts: 580
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3892
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Don Kiddick
Ranch Hand
Posts: 580
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic