Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp:setProperty

 
niranjan mohan
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was trying to test the functionality , it did not work .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic