I am using <jsp:setProperty> in my JSP page to populate values in the bean and passing it over servlet through session. In my servlet, I am able to retrieve the bean object, but all its properties are null. Any insight on this?
Uma, you are submitted the form to a servlet and there you need to get and set the form values to a bean by initialize the bean. in old days people used only jsps in some of applications. in that kind of application jsp form submitted to a jsp. and you can use useBean action tag to set the submitted values to a bean instead of scriptlets in that jsp.
in your case useBean is processed long back by Jsp engine and the scope(request) is completed when the response sent to browser.
what you have to do now: just get the submitted value in servlet and set the values into the bean, dont forget to initialize the bean before set the values.
Joined: Jul 30, 2009
Can you please explain to me how I can get those values in my servlet?
Also, I changed the scope from request to session.