• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doGet method

 
nizamuddin
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to make doGet method not to appended message to URL as in the case of doPost
 
Paul Bourdeaux
Ranch Hand
Posts: 783
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The doGet() method in a servlet corresponds to the GET method in the HTTP protocol (IETF standard, RFC 2616). Its primary role in life is to request some thing from a server. It is notreally designed to send data to the server, although it is possible to send a small amount. If you do send data to the server via the GET method, it will be appended to the URL. There is no work around to this.

For futute reference, take a look at the HTTP method definations.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The doGet method is not appending the querystring variables.
The browser is.
 
Bosun Bello
Ranch Hand
Posts: 1511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you don't want the data to show up in the URL, just use POST. of course, that means you will have to create a form if you are not already using one.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic