Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Can a servlet include jsp files?  RSS feed

 
Ryan Yeap
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way? for servlets to include external jsp files to compile and display them?
thanks
 
Alejandro Villalobos
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes, including jsp files in a servlet like in a jsp is possible, you have to use the following sentences:
request.getRequestDispatcher("/myJsp.jsp").include(request,response);
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!