• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP Template for Email

 
Felix Ng
Greenhorn
Posts: 9
Eclipse IDE Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know there is similar question before, but i really wanna to see if there is any better answer today.

We are all JSP 2.0 projects, 2.0 + EL, and we really want to reuse some JSP as our template, they are actually the same page content, just less style. My team really think there is a better way, other than:
1. Use another template engine and redo all presentation logic
2. Use URLConnection to grab the page (each page need to go through the web server)

Does anyone know anything to fake a request/response object, such that we can do a getRequestDispatcher(url).include(req, res) within our code?
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSP has jsp:include for including static content and other web resources, and the include directive (<%@ include file="..." %>) for including JSP fragments.

If you're looking for a more elaborate templating solution, have a look at SiteMesh.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Felix Ng",
Please check your private messages.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic