Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within JSP
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
JSP
any othe way to getParameters?
malik ge
Ranch Hand
Posts: 69
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
I have a
jsp
page on which I have two fields.
<form method="Post" action="check.jsp"> First Name:</td> <input type="text" name="firstname"> Last Name:</td> <input type="text" name="lastname"> <input type="submit" name="action" value="Register"> </form>
I want to know is there any other way to get the firstName and lastName on the check.jsp without using
request.getParameter("firstname"); request.getParameter("lastname");
Bear Bibeault
Sheriff
Posts: 67746
173
I like...
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
You should
not be submitting to a JSP in the first place -- that's a bad practice from 10 years ago...
But, if you insist, you should be using the EL to get values. The built-in
param
and
paramValues
maps give you access to the parameters.
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
malik ge
Ranch Hand
Posts: 69
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Sorry, but what I meant to ask is if I don't specify the name property in the form , and submit it to a
Servlet
or JSP then it is possible to get the values?
without using request.getParameter();
<form method="Post" action="controller"> First Name:</td> <input type="text" > Last Name:</td> <input type="text" > <input type="submit" name="action" value="Register"> </form>
Bear Bibeault
Sheriff
Posts: 67746
173
I like...
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Of course not. If there's no name, there's no parameter even submitted.
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
malik ge
Ranch Hand
Posts: 69
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Ok.
Thanks
Consider Paul's
rocket mass heater
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Simple jsp form
how to get utf-8 data from query string in JSP
JavaMail won't send mail
hide email and password on contactus jsp
Struts2MySQL
More...