my dog learned polymorphism*
The moose likes JSP and the fly likes jsp:setProperty Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "jsp:setProperty" Watch "jsp:setProperty" New topic
Author

jsp:setProperty

niranjan mohan
Greenhorn

Joined: Aug 18, 2012
Posts: 3
Hi

I tried using the jsp set property to get the form elements , by setting the request to session object and getting the values in the servlet . It does not work when i don't give the value

in the JSP





In the servelt the Object is null , but instead of mentioning the param if i explicitly state the value="XXX" i get the correct bean in the servlet .



The below code works






Douglas Carvalho
Greenhorn

Joined: Oct 09, 2008
Posts: 4
Hi. Well, I´m kind noob in JSP and Servlets myself, but this code looks a little strange. See, you´re trying to get and set the user property in the same page. So, on this situation, the "param" attribute should work? In runtime the code with the "param" attribute will run but you don´t have the "param" at this moment since the user haven´t typed yet, you see..
niranjan mohan
Greenhorn

Joined: Aug 18, 2012
Posts: 3
I was trying to test the functionality , it did not work .
 
Don't get me started about those stupid light bulbs.
 
subject: jsp:setProperty