• Post Reply Bookmark Topic Watch Topic
  • New Topic

what is passed?

 
Mike Cunningham
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I do a post or a get....what is passed back to the servlet? a list of specified key/value pairs....or the entire html page?
 
Bosun Bello
Ranch Hand
Posts: 1511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The form on the HTML page, with a list of input name/value pairs.
------------------
Bosun
SCJP for the Java� 2 Platform
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is passed is HTTP requests. The form data is encoded into the request, and no HTML is ever sent to the servlet. How it is encoded is determined by the method attribute of your form (GET or POST).

GET and POST requests look different. Following, are examples of each:

GET
GET (with form data)POST (with form data)For an example of POST (multi-part) check out this topic: http://www.javaranch.com/ubb/Forum7/HTML/006987.html

Hope that helps you.
[This message has been edited by Mike Curwen (edited December 05, 2001).]
[This message has been edited by Mike Curwen (edited December 05, 2001).]
 
Mike Cunningham
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the information. I especially like the examples outlined by Mike Curwen. That helps me out.
Thanks again!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!