• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Do Get and Do Post

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A few questions on GET and POST methods when used in JSPs...
1. Is there any limit on these methods over density of data?
2. If yes,which of these 2 methods can handle more data? and what's that limit?
3. where should one use which method in particular?
answers...?

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
u can send more data by using post method.This is supposed to be secured when compared to Get method becoz the datas are not transferred as query string in case of post but in get this is done by passing as a query string.
hope this will help
-regards Rudhra
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi this has been discussed at this thread
http://www.javaranch.com/ubb/Forum7/HTML/002665.html
Lets answer your questions all the same
1. limits on density of data: I hope you mean amount of data.. Get can handle much lesser data than Post.. Get can handle as much data as can be appended to the URL (I guess you know that 'Get' data is passed as part of URL).. Now that means it is browser dependent (I'm not sure of this).. All the same 1000 bytes is considered widely as a limit.. As for Post, theoretically it can carry any amoun t of data since now the data is part of the HTTP body... However it makes sense to keep in mind that the lesser data you pass the better.. network etc etc..
2. I guess 1. answers this
3. It is basically more secure to use Post since data is not appended to the URL and is not visible explicitly.. However even Post data is easily retreivable and one should adopt other security mechanisms if the data needs to be secured such as in a transaction based site...
I have quoted below as is from Art Metzers posting in the other mentioned thread..
According to Jason Hunter, author of Java Servlet Programming (an excellent book on the topic of servlets, by the way),
"In practice, the use of GET and POST has strayed from the original intent....Just remember that GET requests, because they can be bookmarked so easily, should not be allowed to cause damage for which the client could be held responsible. In other words, GET requests should not be used to place an order, update a database, or take an explicit client action in any way." (p. 17)
 
N Jain
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for the nice and detailed explanation...
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic