tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject RE: SEO and servlets
Date Sat, 07 Dec 2002 02:34:54 GMT

On Fri, 6 Dec 2002, Cox, Charlie wrote:

> Date: Fri, 6 Dec 2002 08:13:20 -0500
> From: "Cox, Charlie" <>
> Reply-To: Tomcat Users List <>
> To: 'Tomcat Users List' <>
> Subject: RE: SEO  and servlets
> I do a silimar thing where all my content is in a database as XML, so that
> the users can update their content when *they* need to(not when I get around
> to it).  Then the html is created using xsl when requested.
> The way that I set this up is that I map a directory to each servlet (or
> sometimes multiple directories to a servlet for different functionality for
> another set of pages) and then use real page names. These appear to be
> static html pages. This allows the pagename to be a prarm for the servlet.

A popular technique for supporting this sort of thing is to use path
mapping with the wild card pattern.  Consider a servlet that is mapped to
"/display/*", and a URL like this:

The "/foo.html" part of that URL shows up in your servlet as the "extra
path info", and can be used to go look up the database information and
perform the translation.

Your application understands that you're executing a servlet that is
creating (potentially) dynamic content.  Yet, to users and search engines,
this appears to be a URL of a static HTML page in the "display"

"Is it live or is it Memorex?" was a marketing slogan for a brand of
audiotapes a few years ago.  Only your app server knows for sure ... :-)

> I also do not have many forms(nor do I use struts,etc) so that is not a
> problem for me.

This kind of dynamic content (where it changes occasionally but not often)
is reasonable to index with a search engine.  One thing you'll want to
make sure you do is include a "Date" header (containing some
representation of when the underlying database was last updated) in the
response -- that way, browsers can also cache the rendered page and only
update when the underlying data changes.

You'll also want to implement the "getLastModified()" method in your
servlet for this to work.

> Charlie


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message