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

servlet query

Naresh Shaan

Joined: Mar 18, 2006
Posts: 22
whn can servlet exception be raised.....
wat causes the servlet to generate servletexception

"The greatest pleasure in life is doing what people say you cannot do." - Walter Bagehot
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

Please read Bear's request from your previous post more closely.

Display names must be two words: your first name, a space, then your last name.

Also, please try to use real words. I suspect your last question wasn't answered because your question was hard to read.

David O'Meara

Joined: Mar 06, 2001
Posts: 13459

From the Javadocs:
Defines a general exception a servlet can throw when it encounters difficulty.

Basically there are any number of things that can go wrong, not just in the servlet but in any of the other classes in the servlet container. If you look closely at the exception, it is designed to contain other exceptions, so this exception is just a way of remembering other exceptions but also (I suspect) a way to indicate that the exception has been 'managed' by the container.

You could also throw servlet exceptions yourself if you didn't want to handle an exception yourself (such as an SQLException) but it would be better to handle this yourself rather than leaving it to the container.

I agree. Here's the link:
subject: servlet query
It's not a secret anymore!