aspose file tools*
The moose likes Servlets and the fly likes submitting HTML form to servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "submitting HTML form to servlet" Watch "submitting HTML form to servlet" New topic
Author

submitting HTML form to servlet

mahesh ogale
Greenhorn

Joined: Jan 14, 2004
Posts: 8
Actually how html form is submitted to servlet?
Does DOM (document object model) come into picture while sumitting form to servlet?

Thanks in advance,
Mahesh
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12788
    
    5
The browser-side DOM controls what a form looks like and the names and values of parameters that are submitted in a request by a form. The servlet side only sees the parameter names and values.
Bill
Prakash Dwivedi
Ranch Hand

Joined: Sep 28, 2002
Posts: 452
There are two main ways how to submit html form i.e Get and Post.
GET, the default, will send the form input in an URL, whereas POST sends it in the body of the submission. The latter method means you can send larger amounts of data, and that the URL of the form results doesn't show the encoded form.


Prakash Dwivedi (SCJP2, SCWCD, SCBCD)
"Failure is not when you fall down, Its only when you don't get up again"
mahesh ogale
Greenhorn

Joined: Jan 14, 2004
Posts: 8
Thanks for your replies.
Is it like that servlet container creates request object from query string so when I write
request.getParameter("textbox1");
I get value entered in textbox1.
Do request object internally maintains name, value pair for each control on the HTML page?
If you could provide information about response object then it would be better.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: submitting HTML form to servlet