Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

doPost and Bookmarking  RSS feed

 
Parthiban Malayandi
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I learned that bookmarking is the one of the difference in GET and POST methods .That is POST pages are cannot be bookmarked, if I understood correctly but Am able to bookmark a page with method ="POST"

So exactly what is the issue with bookmarking the page with method="POST ".

Thanks in advance

 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A POST -like a GET- results in a web page being returned, and that page can be bookmarked. But the bookmark will not capture the form data that was submitted in the POST, so it may not make sense to bookmark the resulting page, because accessing it without the form parameters may not be the same as accessing it with the from parameters.

This is different with GET, since GET keeps all form parameters in the URL (which is part of the bookmark).
 
Harpreet Singh janda
Ranch Hand
Posts: 317
Eclipse IDE
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can Bookmark both type of pages.
The intention here is that the bookmarked page will not serve the purpose. for example suppose you have a page which is rendered by a get Request and there is a parameter in the request named as "Action" so the url will be some what like:



In above case the controller Servlet will decide an action depending on "Action" parameter. If you will bookmark this page the parameter will be saved as a part of the url. So if you will recall this url from bookmarked page. You will get the required result because the correct action will be taken by the control Servlet.

Now take the case of "Post". Here above url will become

and parameter "Action" will be sent behind the seen. So if you will bookmark this page only above url will be saved (that is without Parameter) so if you will recall the above bookmarked page, controller Servlet will not be able to decide the correct action because of missing parameter and hence you will not get the desired page.

 
Parthiban Malayandi
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ulf and Harpreet now I understood
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!