Meaningless Drivel is fun!
The moose likes JSP and the fly likes passing values from jsp to java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "passing values from jsp to java" Watch "passing values from jsp to java" New topic

passing values from jsp to java

racer mec

Joined: Feb 15, 2005
Posts: 4
hi guys,
can i pass values from a jsp to a java code.any help is welcome.
Aaron Parker

Joined: Jan 31, 2004
Posts: 27
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

Joined: Nov 01, 2002
Posts: 364
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.....

No more rhymes! I mean it!<br /> <br />Does anybody want a peanut?
I agree. Here's the link:
subject: passing values from jsp to java
It's not a secret anymore!