tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From graghupa...@aegonuk.co.uk
Subject RE: redirecting requests
Date Tue, 15 Apr 2003 12:45:08 GMT
Do the following 

in your server.xml

change : <Context path="/" docBase="ROOT" debug="0"/>
to : <Context path="" docBase="ROOT" debug="0"/>

create a directory called "ROOT" inside /usr/tdk-2.2/webapps/

put your index.html in /usr/tdk-2.2/webapps/ROOT/

restart and all should be ok..


Regards
guru


-----Original Message-----
From: Ilan Azbel [mailto:ilan@mdio.net]
Sent: 15 April 2003 13:39
To: Tomcat Users List
Subject: RE: redirecting requests


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

---------------------------------------------------------------------
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