File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » JSP
Bookmark "jsp:setProperty" Watch "jsp:setProperty" New topic


niranjan mohan

Joined: Aug 18, 2012
Posts: 3

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

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

Joined: Aug 18, 2012
Posts: 3
I was trying to test the functionality , it did not work .
I agree. Here's the link:
subject: jsp:setProperty
It's not a secret anymore!