Sure. You can use a template engine like WebMacro and choose the template
to return based on the URL.

   http://webmacro.org

You could just concatenate files, but using a template engine allows you
to insert the dynamic content all over the document. For example, it is
frequently useful to be able to set the <title> as well as the contents
in the body of the document.

Justin


Quoting Haakon Emblemsvaag ([EMAIL PROTECTED]):
> I need to include html content, which can be static or dynamic, in a
> template. The
> template itself can also be static or dynamic.
>
> A servlet should be mapped to the "/" prefix so that every request
> on the site goes through this servlet. The servlet checks the content type
> for "text/html" and includes the content of the requested URL in the
> template.
>
> Is this possible? If so, how may I get the content from the template and the
> requested URL
> since this must be retrieved via the web server (to generate the dynamic
> content)?
>
> -Haakon Emblemsvaag
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to