File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Doubt" Watch "Doubt" New topic


Raj Neets
Ranch Hand

Joined: Nov 12, 2002
Posts: 46
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

Joined: Dec 20, 2000
Posts: 61
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.
I agree. Here's the link:
subject: Doubt
It's not a secret anymore!