dcsimg
Alternative to request.getParameter()
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Adeniran_Fajemisin
Posted On:   Thursday, June 28, 2001 11:20 AM

Hi all-- I hope I didn't post this message twice... but here it goes. I have a JSP which has a form in it. The form contains upwards of 50 fields. When the JSP is being loaded, I use the jsp:getProperty tag to retrieve the contents of the bean, which is used to populate the fields. Now when I try to save the form, I'm currently using request.getParameter() in my servlet to update the bean with the updated form values. My question is as followed, is it possible to dynamically populate the javabean with the updated form values without using the multitude of request.getParameter() method calls. Keeping in mind the following: - Each form fields has a corresponding attribute   More>>

Hi all--


I hope I didn't post this message twice... but here it goes.


I have a JSP which has a form in it. The form contains upwards of 50 fields. When the JSP is being loaded, I use the jsp:getProperty tag to retrieve the contents of the bean, which is used to populate the fields. Now when I try to save the form, I'm currently using request.getParameter() in my servlet to update the bean with the updated form values.


My question is as followed, is it possible to dynamically populate the javabean with the updated form values without using the multitude of request.getParameter() method calls.


Keeping in mind the following:

- Each form fields has a corresponding attribute in the java bean.

- The java bean is currently request scoped and "might" have to stay that way.


I'm running the application on Weblogic 5.1, using JSDK2.2 and JSP 1.1


Any help will be greatly appreciated.


Thanks.


Niran

   <<Less

Re: Alternative to request.getParameter()

Posted By:   Thomas_Dietrich  
Posted On:   Thursday, June 28, 2001 01:13 PM

Hello Adeniran Fajemisin,


Make sure your set methods are public and use the wildcard version of setProperty tag for that bean.


Example:


Hope this helps.


Sincerely,


Thomas Dietrich

About | Sitemap | Contact