aspose file tools*
The moose likes JSP and the fly likes Executing a JSP from aStartup Servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Executing a JSP from aStartup Servlet" Watch "Executing a JSP from aStartup Servlet" New topic
Author

Executing a JSP from aStartup Servlet

VIDYAPRAKASH RAMARAJU
Greenhorn

Joined: Aug 12, 2003
Posts: 1
Hi Guys
I have situation like this. I need to call a JSP not to use forward or sendredirect method, because it is starrtup servet from that i need to execute a JSP file. if any one have any idea about this plz let me know or reply in this forum i would appereciate it.
Thanks
Vidya
Carl Trusiak
Sheriff

Joined: Jun 13, 2000
Posts: 3340
This belongs in JSP, I'm moving it there!
Carl Trusiak
Sheriff

Joined: Jun 13, 2000
Posts: 3340
Everying in a JSP gets placed inside a method _jspService(request, response) in your servlet, you can use RequestDispatcher.include(request, response) but, only from methods that have request and response objects. From your post, I assume you want to call this from init(). That, you can not do. Refactor any code in the JSP into a regular Java Object and call it there!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Executing a JSP from aStartup Servlet