Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to call jsp from java class without using any servlet

 
Rajesha Acharya
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 440
Eclipse IDE Hibernate Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic