• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

web-app advice

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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:

<html>
<head>
... import common tags from a file "head.xyz", passing a parameter
$title...
</head>
<body>
... import a navigation banner code from "nav.xyz"
<p> ...</p>
</body>
</html>

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
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JSP custom actions (formerly known as "custom tags").
 
You are HERE! The other map is obviously wrong. Better confirm with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic