File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Length of URL in get method Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "Length of URL in get method" Watch "Length of URL in get method" New topic
Author

Length of URL in get method

Bharatesh H Kakamari
Ranch Hand

Joined: Nov 09, 2000
Posts: 198
What is the maximum length of URL in get method ?
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 3901
I believe there is a limit, but I dont know what it is.

I never took notes in college. That's how I got a 4.0 the first 2 years, and a 3.5 the second two years.
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I believe it is all in all (path + query-string) 256 characters
bsp
[This message has been edited by Peter Singewald (edited March 08, 2001).]
kumard
Greenhorn

Joined: Mar 06, 2001
Posts: 4
Originally posted by Bharatesh H Kakamari:
What is the maximum length of URL in get method ?


using get method you can pass parameter up to 2k. some place I found there is no limitation.
Sander Fieten
Greenhorn

Joined: Mar 08, 2001
Posts: 13
Hi,
I assume the question is about the maximum length of an URL for getting data using the GET method specified in the HTTP protocol?
In this spec no limit is given for URLs. It's stated that a server must be able to handle URLs for all resources they serve and that can be generated by GET based forms they serve.
See at http://www.ietf.org/rfc/rfc2616.txt for the complete HTTP spec.
greetings
Sander
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6913
"kumard"
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Posts which contravene the naming convention are not eligible to win books! Please choose a new name which meets the requirements.

Thanks.

A Convergent Visionary ~ Frank's Punchbarrel Blog ~ LinkedIn profile
Barry Andrews
Ranch Hand

Joined: Sep 05, 2000
Posts: 523

The length of the url for get depends on which application server you are using. For Weblogic 6.0, it is 4k bytes. It also depends on the browser, but IE is really high. I don't rememeber now, but I know that noone would ever run into a problem because the maximum is so high.

Barry
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

According to previous reading I did, the supported length for URL strings is very hard to specify. Acording to the spec there is no defined limit, but in reality the length must be supported by each step during the transfer of data.Therefore it is dependant on browsers, proxies, web servers, app servers and anywhere else the url has to be sent through.
The behaviour of long strings is not specified either. In most case it will be truncated, but (once again) I've read that strings over 10k can kill the IIS process.
As a rule of thumb, (besides usually using POST) I personally wouldn't go over 2k and would be unhappy over 1k.


[ JavaRanch FAQ ][ Book Promotions ][ DbTamer ][ BumperStickers ][ JavaRanch Badges ]
Suneel Setlur
Ranch Hand

Joined: Nov 26, 2000
Posts: 202
Its 240 characters.

Suneel
 
 
subject: Length of URL in get method
 
Threads others viewed
Array of Strings
doGet() request.... QueryString size?
get the length of the string
length
very basic question (length)
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture