This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi The capacity the doGet can send to the server is 256kb, right? Yes
The types of protocols used in HttpServlet is just HTTP. What about Generic servlet ?? Generic servlet are not protocal based. If u see the arguments in the service method, u will see it has Request and Response as compared to HttpRequest and HttpResponse. If u application is non-http protocal based u can go for generic servlet.
What are the exceptions thrown by Servlets ? Why ? Exception throw by Servlets are IOException and ServletException. ServletException is a subclass of java.lang.Exception that is specific to servlets--the class is defined in the javax.servlet package. This exception is thrown to indicate a general servlet problem. It has the same constructors as java.lang.Exception: one that takes no arguments and one that takes a single message string. Servers catching this exception may handle it any way they see fit.
For servers that buffer their output, the IOException is thrown when the buffer fills up and its contents are flushed.
Makarand, JavaRanch is a community of people from all over the world, many of who are not native English speakers. While using abbreviations like "u" instead of spelling out "you" is convenient when text messaging your friends on a cell phone or in a chat room, it presents an extra challenge to those that are already struggling with English. Additionally, such shortcuts may confound automated translation tools that patrons of the Ranch may be making use of.
I would like to ask for your help in making the content of JavaRanch a little easier to read for everybody that visits here by not using such abbreviations.
The HTTP RFC defines that a GET request should support at least 256 characters. I'll find a link. In practice it should be significantly more than this, but that value depends on every server that the request passes through, including proxies. If you send more it may be truncated unexpectedly, and I've even heard of servers that crash when sent more than 10,000 characters in a GET request.
Hmm, [url=http://www.itlab.musc.edu/help/Tutorials/PERL/HTTP_tut.htmlthis page[/url] refers to the 256 character limit with respect to perl and support by environment variables. I haven't been able to find the RFC referrin to the 265 char limit, sorry.
Joined: Dec 04, 2004
The Servlet Specs also says that only limited data can be send with get request, but does not specify the exact size.
I think the problems are: 1) the initial minimum value specified was so small and 2) it was so long ago
that the value is out of date and in practice could be just about anything. Unfortunately it is all we have to work with, and anyone developing new software and using the RFC may implement the same limit. There is just no way of knowing.