This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Doubt" Watch "Doubt" New topic
Author

Doubt

Raj Neets
Ranch Hand

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

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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Doubt
 
Similar Threads
How do you handle exceptions in init()
Exception Handler for doGet or doPost
Unavailable Exception Problem
Compilation Error
unable to retrieve cookies & logout properly