Simple JSP question

Prince

Member
Apr 12, 2001
27
0
0
How can I read the values of a TEXT FIELD within a JSP? What is the code that can access the text field?

I don't want to pass the values by session to itself.
 

AmigaMan

Diamond Member
Oct 12, 1999
3,644
1
0
A text field? Do you mean an HTML element passed by way of a form? Just remember that a JSP is nothing more than an HTML page and a servlet. The value of an HTML element passed in a form is accessed the same way you would access it from a servlet, just use the request object.

String txt = request.getParameter("TEXTFIELDNAME");