Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to call a jsp from a servlet

 
Shivanath Yerra
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can u tell me how to call a jsp from a servlet
 
karl koch
Ranch Hand
Posts: 388
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
well, just call the location the jsp is located at.
did i get your question right ?
karl
 
Shivanath Yerra
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no, I Want to Know How to invoke JSP from a Servlet
for example if u want to show a html we use request.redirect(abc.html) similarly how can we invoke a jsp.
 
karl koch
Ranch Hand
Posts: 388
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
perhaps im stupid and still dont get it....
jsp and html are the same for client. they dont care if it jsp or html since out of the jsp a pure html page is created. so you can call it request.redirect("somejsp.jsp"). right ??? anybody ???
karl
 
Shivanath Yerra
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Now i came to Know how to invoke the jsp from a servlet
it is like this

JspFactory jf=JspFactory.getDefaultFactory();
PageContext pc = jf.getPageContext();
pc.include("sample.jsp");

 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic