File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes web-app advice Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "web-app advice" Watch "web-app advice" New topic

web-app advice

Andy Cooke

Joined: May 14, 2004
Posts: 3
Hi there,

I'd like to build a web-app using tomcat. To avoid html code duplication, I would like to be able to import common html code from other files,

e.g. index.html would look like:

... import common tags from a file "", passing a parameter
... import a navigation banner code from ""
<p> ...</p>

What is the best way of achieving this using tomcat? Server-side includes? Or something smart using Velocity/ JSP?

I had envisaged using Velocity for my dynamic pages, but it seems an overkill solution for the static content. Also, I'm not sure how to configure tomcat to use some particular servlet for the default page of an app.

Thanks for any tips,

best wishes

Andy Cooke
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60782

JSP custom actions (formerly known as "custom tags").

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: web-app advice
Similar Threads
how to use ssi in servlets using apache web server and jserv
Servlet context in Tomcat Production server
Head First Servlet and JSP - MVC download JAR example
Head First Servlet and JSP - MVC download JAR example
not able to access the ServletContext path