• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

simple queries

 
Nikita Deshmukh
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
A few simple queries :

The capacity the doGet can send to the server is 256kb, right?
The types of protocols used in HttpServlet is just HTTP. What about Generic servlet ??
What are the exceptions thrown by Servlets ? Why ?

Thanks in advance,
Nikita
 
Makarand Parab
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.


Let me know if it makes sense 2 u

Regards
Makarand Parab
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64721
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Please read this for more information.

thanks,
bear
Forum Bartender
 
Nikita Deshmukh
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Makarand

That really helped. Thank you so much for your simple and good explanation.

Regards,
Jyotsna.
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

The capacity the doGet can send to the server is 256kb, right?


I doubt about it. I think it is not specific. It depends on browser/server.

Thanks
[ August 04, 2005: Message edited by: Narendra Dhande ]
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks David,

The Servlet Specs also says that only limited data can be send with get request, but does not specify the exact size.

Regards
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic