aspose file tools*
The moose likes Sockets and Internet Protocols and the fly likes How to call jsp from java class without using any servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "How to call jsp from java class without using any servlet" Watch "How to call jsp from java class without using any servlet" New topic
Author

How to call jsp from java class without using any servlet

Rajesha Acharya
Greenhorn

Joined: Mar 18, 2013
Posts: 23
Hi
I just want to call jsp page from simple java class where i don' t have any request objects. without using any servlet. Just forward to jsp page from java class.
Saif Asif
Ranch Hand

Joined: Aug 11, 2011
Posts: 440

i don' t have any request objects

I dont think that its practically possible to get any re-direction done without the request object.
Just forward to jsp page from java class

Without the request/response object , how will you inform the container to forward the request to a JSP file. "What" will you forward ? When you perform a redrection or even a page forward, you tell the container to do that for you by calling the response object. Reponse is the 'entity' which will forward your flow.

I think you need to provide us with more information as to what are you trying to achieve , then maybe we can guide you further as to what can be done and what can't .


Muhammad Saif Asif Mirza
OCJA(5/6) OCJP(6) OCJWCD(6)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to call jsp from java class without using any servlet
 
Similar Threads
call jsp from simple java class
Compiling result.jsp (page 89 HFSJ)
Unable to compile class for JSP
how to jump page like RequestDispatcher.forward(...)
Call servlet from java class and redirect to jsp page