Jump to content
xisto Community
tinoymalayil

Difference Between Get() And Post() Method To Set The Data...

Recommended Posts

Hui friends ..there are two types of method get() method and post() method using in JSP to send data ..post() method send the data in header of the body and get method sends through the address bar..what is the advantage of post() method ..please reply.

Share this post


Link to post
Share on other sites

The biggest advantage would be that POST action would be more secure as a method since the data being sent is not visible in the URL.
Using the GET method adds the data to the visible portion of the URL and is "less secure".
When send ing sensitive information, or data which could be used to log-in to a site as an example, use the POST method. GET is often used to direct the client to specific pages on a dynamic site. For example, this page can be found using the GET method and the Query String is everything following the last '/' in the URL

ie: http://forums.xisto.com/topic/67555-difference-between-get-and-post-method-to-set-the-data/

Share this post


Link to post
Share on other sites

The GET method should be used for retrieving information from the server and should not be used for any changes to be made at the server-side.The POST method is more secure and should be used for actions that'll make changes at the server-side.In the POST method, the data is included as a part of the message body; whereas in the GET, the data is passed in the url as query string.The maximum length of the URL that is supported by Internet Explorer is 2083, so you cannot send huge amount of data using the GET method, whereas you've no limits using the POST method.

Share this post


Link to post
Share on other sites

Well. to answer shortly and I am sure you can understand by yourself too,if you try to think harder. So if you use post(), this means data and information cannot be seen. So you can send a password using post(), while using get() your password would be visible.

Share this post


Link to post
Share on other sites

You would not want the chunk of data entered in the form to be displayed or embedded in the url ya? For get(), I would personally used it if it is to send none "personal" information, like sending of page etc. Anything else, I will use post().

Share this post


Link to post
Share on other sites

With get request we can send data of 2048 characters. And there is no limit with post request. Get data is appended at the end of url. It is visible to everybody. Post data is sent in body of request header. And it is secure to send password in post request.

-reply by avinash

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.