This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can a servlet include jsp files?

 
Ryan Yeap
Greenhorn
Posts: 28
  • 0
  • 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
  • 0
  • 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);
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic