aspose file tools*
The moose likes Servlets and the fly likes Loading Driver. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Loading Driver." Watch "Loading Driver." New topic
Author

Loading Driver.

swapna manne
Greenhorn

Joined: Mar 05, 2005
Posts: 2
Hi,
What happens if i load Diiferent drivers at same time.........

like
Class.forName("type one driver");
Class.forName("type four driver");
and How to open Error page of Jsp from a servlet?
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
- Both will be loaded.

- forward to error page from your servlet using RequestDispatcher. Or make an error page entry in your deployment descriptor. Both would work fine.
Nikhil Menon
Ranch Hand

Joined: Nov 22, 2004
Posts: 70
originally posted by Adeel Ansari
- forward to error page from your servlet using RequestDispatcher. Or make an error page entry in your deployment descriptor. Both would work fine.


1.If you use RequestDispacther to forward to an 'jsp error page' then you have to set the request attribute asrequest.setAttribute("java.servlet.jsp.jpsException",e) and then forward('e' is your exception object). Advantage of doing so is can get the exception object in your error page too as the jsp implicit object 'exception'. Then you do stack trace or handle it in your way.

2.If you use deployment descriptor then it works fine and is easier.

Nikhil Kanjulli Menon
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Originally posted by Nikhil Menon:
1.If you use RequestDispacther to forward to an 'jsp error page' then you have to set the request attribute asrequest.setAttribute("java.servlet.jsp.jpsException",e) and then forward('e' is your exception object). Advantage of doing so is can get the exception object in your error page too as the jsp implicit object 'exception'. Then you do stack trace or handle it in your way.


How it sounds?

"The isErrorPage attribute indicates if the current JSP page is
intended to be an error page for other JSP. If true, then the implicit scripting variable exception is defined, and its value is a reference to the offending Throwable object. If the isErrorPage attribute value is false, then the exception implicit variable is unavailable."
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Loading Driver.