File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt

 
Raj Neets
Ranch Hand
Posts: 46
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
I have a question
why doGet() throws ServletException.?
i tried not to throw the ServletException, in my doGet method, but still it complie and executes fine.
Can someone please explain to me why?
 
saager mhatre
Ranch Hand
Posts: 61
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JSDK framework uses the ServletException as a stansrad means of propogating and handling exceptions within a servlet. Exceptions if any within a servlet must be either converted to or wrapped around a ServletException of a subclass of ServletException. These are propogated to the servlet container which handles them suitably, according to its configuration.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic