Servlet and HTML form fields.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Yurik_Siva
Posted On:   Tuesday, November 20, 2001 08:10 PM

Hi,


I realy need help on this.

I have static HTML form and servlet which is retrieving data from Data Base. I need to populate form fields with data from servlet when form is loaded in to browser.

Maybe somebody knows how to do that?

Thanks.

Re: Servlet and HTML form fields.

Posted By:   Sad_Guy  
Posted On:   Tuesday, November 20, 2001 09:16 PM

The page must be a JSP file(just rename your extension from .html to .jsp) and after that, the data from the servlet could be set into the form fields in this way:

">


There are also other ways though. This example assume that your servlet had set some attributes beforehand before dispatching to the JSP file. The form just simply retrieve the attribute values from the servlet.

About | Sitemap | Contact