Posted By:
Sasha_Haghani
Posted On:
Monday, April 23, 2001 12:43 PM
Hi, I have a question about how I might call/invoke a JSP from another Java class (which is not itself a Servlet) using the Servlet/JSP container. For instance, I'd like to use a JSP to automatically generate the body of an e-mail message on a scheduled basis. In this situation, there wouldn't be corresponding Request or Session objects. Are there any methods that can be called on the Servlet/JSP container which would (a) trigger the compilation of the JSP page into a servlet (if needed) (b) return the response stream of the JSP (i.e.: service method). Alternatively, is there anyway to use the getRequestDispatcher or getNamedDispatcher methods to get a handle to a JSP. While, I'd like to use a standard container-neutral
More>>
Hi, I have a question about how I might call/invoke a JSP from another Java class (which is not itself a Servlet) using the Servlet/JSP container.
For instance, I'd like to use a JSP to automatically generate the body of an e-mail message on a scheduled basis. In this situation, there wouldn't be corresponding Request or Session objects.
Are there any methods that can be called on the Servlet/JSP container which would (a) trigger the compilation of the JSP page into a servlet (if needed) (b) return the response stream of the JSP (i.e.: service method).
Alternatively, is there anyway to use the getRequestDispatcher or getNamedDispatcher methods to get a handle to a JSP.
While, I'd like to use a standard container-neutral facility for doing this, I'd also like to hear about container-specific alternatives which might only work on Tomcat, BEA WebLogic, etc.
Any help is much appreciated.
<<Less