tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Turner <tomcat-u...@johnturner.com>
Subject Re: redirecting requests
Date Tue, 15 Apr 2003 13:03:59 GMT

If you are using a docBase of "ROOT", there must be a directory called ROOT 
under that Host's appBase.  That is where your file goes.

So, if you have:

<Host name="myhost" appBase="webapps" />

and

<Context path="/" docBase="ROOT" debug="0"/>

Then your file belongs in $CATALINA_HOME/webapps/ROOT.

John

On Tue, 15 Apr 2003 14:38:34 +0200, Ilan Azbel <ilan@mdio.net> wrote:

> I am struggling to get this right.
>
> I am using Turbine on a Linux platform. I have the following in the
> server.xml file:
>
> <Context path="/" docBase="ROOT" debug="0"/>
>
> I have created an index.html file that redirects (not a .jsp as mentioned
> below) that contains the following code:
> <html>
> <head>
> <script>
>
> document.location="http://server.mydomain.com/appname/servlet/appname/";
> </script>
> </head>
> </html>
>
> I am struggling to understand where I must place this file the directory
> structure. I have already copied the file into the following locations 
> but I
> have had no luck:
> /usr/tdk-2.2/webapps/appname/docs/index.html
> /usr/tdk-2.2/webapps/appname/index.html
> /usr/tdk-2.2/webapps/appname/WEB-INF/index.html
> /usr/tdk-2.2/webapps/index.html
>
>
> I don't know whether I should create a directory called ROOT inside
> "webapps" or what?
>
> When I type in a URL I either get the message
>
> -------------------------------------------------------------------
> type: Status report
>
> message: No Context configured to process this request
>
> description: The server encountered an internal error (No Context 
> configured
> to process this request) that prevented it from fulfilling this request.
> -------------------------------------------------------------------
>
> ..or ..
>
> -------------------------------------------------------------------
> type: Status report
>
> message: /
>
> description: The requested resource (/) is not available.
> -------------------------------------------------------------------
>
> depending on how I fiddle with the entries in server.xml
>
> Do you have any idea how to interpret the messages? How should I 
> configure
> server.xml and where would be my root directory?
>
>
> Ilan
>
>
>> -----Original Message-----
>> From: Tim Funk [mailto:funkman@joedog.org]
>> Sent: 15 April 2003 01:30
>> To: Tomcat Users List
>> Subject: Re: redirecting requests
>>
>>
>> In your ROOT webapp (see server.xml) create a tiny index.jsp:
>> --
>> <%@ page session="false" %>
>> <%response.sendRedirect("/appname/servlet/appname/");%>
>> --
>> OR
>> --
>> <%@ taglib uri="http://java.sun.com/jstl/core/c.tld" prefix="c" %>
>> <%@ page session="false" %>
>> <c:redirect url="/appname/servlet/appname/" />
>> --
>> OR Use ScriptAlias from apache
>> OR Use a servlet wich also does the above
>>
>>
>> -Tim
>>
>> Ilan Azbel wrote:
>> > I have a website who's URL looks like this:
>> >
>> > http://server.mydomain.com/appname/servlet/appname/
>> >
>> > I would like users to be able to type in
>> > http://server.mydomain.com and be redirected to the above URL
>> >
>> > How can I do this?
>> >
>> > Ilan
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>> >
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>



-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

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


Mime
View raw message