| Author |
set all form parameters using jsp:setProperty
|
Vinod Awar
Ranch Hand
Joined: Nov 06, 2006
Posts: 125
|
|
Hi all i was trying to set the bean properties using <jsp:setProperty name="info" property="*"/> as follows and in the servlet i get a reference to that bean and try to access the bean properties as shown below. but iam getting null values for both username and password. Any suggestions? Thanks
|
The biggest bankruptcy is the loss of enthusiasm
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14672
|
|
setProperty will be used when your jsp page is being called, not when the form will be submitted. Which means that nothing will be put into your bean. You're submitting to a servlet so use methods like ServletRequest.getParamter to get the parameters sent. Your code would work if you'd be using some 'in-between' jsp with the setProperty tag in it : login.jsp --[submits to]--> setparams.jsp --[forward to]--> myservlet
|
[My Blog]
All roads lead to JavaRanch
|
 |
 |
|
|
subject: set all form parameters using jsp:setProperty
|
|
|