You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Colin Browell <cb...@yahoo.com> on 2003/03/14 09:47:41 UTC

Tomcat page redirect

Is there a simple way of causing a page redirect in Tomcat?

In Apache a simple change to the httpd.conf would suffice, but in
Tomcat the learning curve seems to be much steeper!

Basically, I have been told to modify our Aepona/Tomcat installation
so that when a user types

  http://mytomcathost:8080

into their browser, then instead of getting the default set of Tomcat
pages (containing examples etc) they will get redirected to the home
page of the Aepona software itself which runs on Tomcat at

  http://mytomcathost:8080/Causeway_PM

Can this be done by a simple change to a Tomcat configuration file?

Thanks

Colin


__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

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


Re: Tomcat page redirect

Posted by Colin Browell <cb...@yahoo.com>.
--- Tim Funk <fu...@joedog.org> wrote:
> The default file is called the welcome file with respect to the
> servlet 
> specification (section 9.9) and is configured via web.xml. You can 
> actually have any file name be your welcome file.
> 

Ah, I see. The web.xml has a <welcome-file-list> section which lists
index.jsp, index.html and index.htm which is obviously a prioritised
search list.

Thanks again

Colin


__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

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


Re: Tomcat page redirect

Posted by Tim Funk <fu...@joedog.org>.
The default file is called the welcome file with respect to the servlet 
specification (section 9.9) and is configured via web.xml. You can 
actually have any file name be your welcome file.


-Tim


Colin Browell wrote:
> --- Tim Funk <fu...@joedog.org> wrote:
> 
>>There is no "easy" way in tomcat. That is most people run apache in 
>>front of tomcat and apache already has the functionality, so there is
>>no 
>>need to duplicate it in tomcat.
>>
>>
>>The easy hack is to create an index.jsp and have it be one line:
>><%
>>   response.sendRedirect("iNeed/MoreCowebll.jsp");
>>   return;
>>%>
> 
> 
> Thanks Tim, that worked fine.
> 
> Although the server defaulted to an index.html file, it seems that the
> new index.jsp has a higher priority than index.html.
> 
> Colin
> 
> 


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


Re: Tomcat page redirect

Posted by Colin Browell <cb...@yahoo.com>.
--- Tim Funk <fu...@joedog.org> wrote:
> There is no "easy" way in tomcat. That is most people run apache in 
> front of tomcat and apache already has the functionality, so there is
> no 
> need to duplicate it in tomcat.
> 
> 
> The easy hack is to create an index.jsp and have it be one line:
> <%
>    response.sendRedirect("iNeed/MoreCowebll.jsp");
>    return;
> %>

Thanks Tim, that worked fine.

Although the server defaulted to an index.html file, it seems that the
new index.jsp has a higher priority than index.html.

Colin


__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

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


Re: Tomcat page redirect

Posted by Tim Funk <fu...@joedog.org>.
There is no "easy" way in tomcat. That is most people run apache in 
front of tomcat and apache already has the functionality, so there is no 
need to duplicate it in tomcat.


The easy hack is to create an index.jsp and have it be one line:
<%
   response.sendRedirect("iNeed/MoreCowebll.jsp");
   return;
%>

-Tim

Colin Browell wrote:
> <cb...@yahoo.com> wrote:
> 
>>Is there a simple way of causing a page redirect in Tomcat?
>>
>>In Apache a simple change to the httpd.conf would suffice, but in
>>Tomcat the learning curve seems to be much steeper!
>>
>>Basically, I have been told to modify our Aepona/Tomcat installation
>>so that when a user types
>>
>>  http://mytomcathost:8080
>>
>>into their browser, then instead of getting the default set of Tomcat
>>pages (containing examples etc) they will get redirected to the home
>>page of the Aepona software itself which runs on Tomcat at
>>
>>  http://mytomcathost:8080/Causeway_PM
>>
>>Can this be done by a simple change to a Tomcat configuration file?
> 
> 
> Anyone?
> 
> I thought that this would be a simple task to cause a page redirect.
> 
> (Incidentally we are running Tomcat, NOT Apache with the tomcat
> module.)
> 
> Thanks
> 
> Colin
> 
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Web Hosting - establish your business online
> http://webhosting.yahoo.com
> 
> ---------------------------------------------------------------------
> 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


Re: Tomcat page redirect

Posted by Colin Browell <cb...@yahoo.com>.
<cb...@yahoo.com> wrote:
> Is there a simple way of causing a page redirect in Tomcat?
> 
> In Apache a simple change to the httpd.conf would suffice, but in
> Tomcat the learning curve seems to be much steeper!
> 
> Basically, I have been told to modify our Aepona/Tomcat installation
> so that when a user types
> 
>   http://mytomcathost:8080
> 
> into their browser, then instead of getting the default set of Tomcat
> pages (containing examples etc) they will get redirected to the home
> page of the Aepona software itself which runs on Tomcat at
> 
>   http://mytomcathost:8080/Causeway_PM
> 
> Can this be done by a simple change to a Tomcat configuration file?

Anyone?

I thought that this would be a simple task to cause a page redirect.

(Incidentally we are running Tomcat, NOT Apache with the tomcat
module.)

Thanks

Colin


__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

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