Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

passing values from jsp to java

 
racer mec
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys,
can i pass values from a jsp to a java code.any help is welcome.
regards
 
Aaron Parker
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know of one way using HTML forms. You can pass in user entered data and retrieve it from the request in the called servlet:


...

...

Then in the DoLogin servlet:



If you need to pass non user entered values, it's possible by passing it thru the action parameter of the form, but I'm here trying to find out how!

Hope this helps.

Aaron Parker
 
Scott Duncan
Ranch Hand
Posts: 365
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Form input is only one way to do it. Values passed in the session, application context, or the request URL are also options. Of course you can use several different persistence mechanisms but this probably isn't what you're looking to do.....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic