get javabean via servlet
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Marika_Ludmann
Posted On:   Thursday, November 13, 2003 03:56 AM

How can I obtain a javabean from a servlet?

I have a jsp page with a form. The user enters the values and on submission of the form another jsp page assigns these values to a javabean with the jsp:setProperty method(s)



Now that I have my javabean I want to use it in a servlet argument to update the database. I guess I can use the request.getParameter to get each attribute of the bean, but how can I just pass the whole bean to the servlet?



Can anyone help? Thank you, Marika Ludmann

Re: get javabean via servlet

Posted By:   Adrian_K  
Posted On:   Thursday, November 13, 2003 04:24 AM

If you put this bean in session or application context, you can access it later using (BeanClassName)session.getAttribute("id_bean_in_session").
About | Sitemap | Contact