tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: Tomcat - a search engine liability?!?!
Date Fri, 13 Dec 2002 03:11:08 GMT


On Wed, 11 Dec 2002, Bill Barker wrote:

> Date: Wed, 11 Dec 2002 23:33:43 -0800
> From: Bill Barker <wbarker@wilshire.com>
> Reply-To: Tomcat Users List <tomcat-user@jakarta.apache.org>
> To: tomcat-user@jakarta.apache.org
> Subject: Re: Tomcat - a search engine liability?!?!
>
> It's probably not much help, but Tomcat 5.x will almost certainly have
> support to do an internal-redirect (like Apache/httpd), instead of the 302
> response.  It is more-or-less required by the current draft of JSR-154 (that
> Tomcat 5 will implement).
>
> To be of even less help ;-),  there is an option in Tomcat 3.3.2-dev (aka
> nightly) to suppress the 302, and serve the welcome-page directly.
>

And when you take advantage of either of these things, be prepared and
code your pages to avoid the most common gotcha -- forwarding instead of
redirecting will change how relative URLs inside your page are resolved
(such as in an <img src="..."> path).

The best solution I've found for this is to use a <base> element inside
<head>, but that can be pretty tedious unless you have a custom tag that
figures out the write base URL for you (like Struts does).

Craig


> "neal" <nealcabage@yahoo.com> wrote in message
> news:GEEMKLMAGKLIODPNCFPBKEHJDHAA.nealcabage@yahoo.com...
> > Thanks but the problem isn't with jsps, and actually, mapping to another
> > extension was more of a secondary problem.  The primary problem becomes
> that
> > I need Tomcat to not redirect (http 302) to a different URL, I want it to
> > stay at http://www.xyz.com and simply show the contents of the default
> page
> > rather than redirect ... a behavior seen in every other http server.  The
> > servlets issue was mentioned (a) to let everyone know that they don't
> index
> > and (b) to say that using a servlet mapped to "/" that would simply
> forward
> > to correct default file won't work because servlets don't index.
> >
> > So, I'm guessing this filter thing is something to look at, mod_rewrite
> too.
> > I'm also going to take a look at apache - my big hesitation there is that
> > the SSL certificate is already bound to Tomcat ... I think I'd have to buy
> > another to work with Apache.  Sigh.
> >
> > Thanks for the thoughts.
> >
> > Neal
> >
> >
> > -----Original Message-----
> > From: Joe Tomcat [mailto:tomcat@mobile.mp]
> > Sent: Wednesday, December 11, 2002 3:50 PM
> > To: Tomcat Users List
> > Subject: RE: Tomcat - a search engine liability?!?!
> >
> >
> > On Wed, 2002-12-11 at 19:19, neal wrote:
> > > Thanks for the suggestions, I'll definitely have to look into them.
> > >
> > > For someone unfamiliar with these things those mod_rewrite or filters do
> > you
> > > think it would be easier to just throw in the towel on using tomcat for
> > http
> > > serving and move Apache in front of it, or is it easier to write one of
> > > these solutions?
> >
> > Don't throw in that towel yet!  Here's one easy solution: Configure
> > Tomcat so that .htm pages are handled as jsps.  This is easy to do:
> > Modify the web.xml (for the server, not the application itself) so that
> > the jsp servlet handles .htm files.  Also .htm should be taken out of
> > the mime types of web.xml in that same file.  Obviously, be very careful
> > that all your static html files are .html if you do this.  One advantage
> > of this is that it means that your server isn't advertising what kind of
> > back-end technology it is using.  Less information is often better.
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> > <mailto:tomcat-user-help@jakarta.apache.org>
>
>
>
>
>
> --
> To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message