tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Miranda" <michaeljamira...@hotmail.com>
Subject Re: Default servlet?
Date Tue, 27 Jun 2000 15:51:55 GMT
Would I still be able to access the environment variables from the servlet 
(such as browser type) when I forward from the index.jsp to the servlet?

Mike

>From: "Jeremy" <jeremy@archaeopteryx.freeserve.co.uk>
>Reply-To: tomcat-user@jakarta.apache.org
>To: <tomcat-user@jakarta.apache.org>
>Subject: Re: Default servlet?
>Date: Tue, 27 Jun 2000 15:04:57 +0100
>
>Hi Craig,
>
>Yep, thanks Craig, the 'Welcome file' facility was exactly what I was
>looking for, it worked. That might be worth documenting. I just searched 
>the
>appdev and uguide docs in Tomcat 3.1, and the sample config files, but
>couldn't see it.
>
>This might fix Xander Heemskerk, Micheal Miranda and Sharad Baranwal's
>problems also, from earlier postings with similar problems.
>
>Jeremy.
>
>
>----- Original Message -----
>From: "Craig R. McClanahan" <Craig.McClanahan@eng.sun.com>
>To: <tomcat-user@jakarta.apache.org>
>Sent: Monday, June 26, 2000 11:59 PM
>Subject: Re: Default servlet?
>
>
> > Jeremy Johnson wrote:
> >
> > > Hi Craig,
> > >
> > > Oops, many apologies, we were talking about two different
>interpretations of
> > > 'default servlet'. What I'm looking for is the ability to enable a
>servlet to
> > > take the place of "index.html" (or whatever), so that it is called 
>when
>only the
> > > domain name is requested (eg. www.mydomain.com). DefaultServlet isn't
>the
> > > solution, I'll keep hunting. Many apologies for the misunderstanding.
> > >
> >
> > Are you perhaps looking for the "welcome file" facility?  This is 
>similar
>to the Apache
> > configuration command "DirectoryIndex", which displays a specified page
>when you specify a URL
> > that resolves to a directory (including the top level directory).
> >
> > For example, you could make a url "http://www.mydomain.com" resolve to
>your page "index.jsp" by
> > adding the following to the web.xml for the "ROOT" context:
> >
> >     <welcome-file-list>
> >         <welcome-file>index.jsp</welcome-file>
> >     </welcome-file-list>
> >
> > and then create an "index.jsp" file in the document root directory of 
>this
>context.
> >
> > Although you cannot map directly to a servlet using this technique, you
>can do so indirectly.
> > Simply make the "index.jsp" page mentioned above a one-line file that
>includes a <jsp:forward>
> > to the servlet you really want to execute, and you should be off to the
>races.
> >
> > Craig McClanahan
> >
> >
> >
> > 
>--------------------------------------------------------------------------
> > To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commmands, email: tomcat-user-help@jakarta.apache.org
> >
> >
>
>
>--------------------------------------------------------------------------
>To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commmands, email: tomcat-user-help@jakarta.apache.org
>

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


Mime
View raw message