tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mekkelsen Madden, Steve" <>
Subject RE: Need help with URL redirecting
Date Mon, 20 Jun 2016 16:53:13 GMT
One thing you could do is have an entry in your webapps\ROOT folder called like: MyAppRedirect.html
 (name can be anything)
Inside the file you need something like:
<META HTTP-EQUIV="Refresh" CONTENT="0; URL=../myApp/connection ">

In your conf\web.xml at the bottom of it, you'll see 3 lines shown below:

Change this to point to your MyAppRedirect.html page.

That's a simple way to redirect your application.  Your DNS / reverse proxy could take care
of the port # and users only need to call your application by name (
when the DNS/reverse proxy redirects it to the server's port say 8088, the html file appends
the remaining portion of the url to what the users typed.

-----Original Message-----
From: Sean Son [] 
Sent: Monday, June 20, 2016 12:42 PM
To: Tomcat Users List <>;
Subject: Re: Need help with URL redirecting

On Fri, Jun 17, 2016 at 3:39 PM, André Warnier (tomcat) <>

> Hi.
> Another tip : on his list,mit is preferred if you respond in or below 
> the previous text.
> That's why I moved your previous answer.
> It makes it easier to follow the conversation without having to scroll 
> back and forth all the time.
> >
>> On Fri, Jun 17, 2016 at 12:03 PM, André Warnier (tomcat) 
>> <>
>> wrote:
>> On 17.06.2016 17:03, Sean Son wrote:
>>> Hello all
>>>> I am new to the list. This is what i am trying to do but need help on:
>>>> I have a webapp running on tomcat 8:
>>>> I am going to set up a DNS record which will 
>>>> point to the IP address of the tomcat server that hosts the 
>>>> webapp.. I want this new DNS record to redirect 
>>>> to
>>>> In other words, I want the URL to redirect port 80 to the URL for 
>>>> the webapp automatically so the users will not have to enter in the 
>>>> port number whenever they want to browse to the webapp. I tried 
>>>> doing research on google and I was not able to find a straight 
>>>> forward way of doing this.
>>>> Any
>>>> help is greatly appreciated!
>>>> The first thing you would have to check, is whether port 80 is 
>>>> still
>>> free
>>> on that server, or if there is already another webserver (e.g. 
>>> Apache
>>> httpd) using it.
>>> The second thing to clarify is whether, apart from "myapp", there 
>>> are other web applications (not called "myapp") which you are 
>>> running or would want to run under Tomcat on that server.
>>> If not, then you might want to run your application as the *default* 
>>> application, so that users would get to it with the URL "
>>>", instead of "
>>> To do this first, have a look at :
>>> and look at #17 : How do I make my web application be the tomcat 
>>> default application
>>> It will just be easier if you clear up the above points first, 
>>> because there are multiple possibilities, and it narrows down the 
>>> scope of the tips we can provide.
> On 17.06.2016 18:43, Sean Son wrote:
>> Hello Andre
>> thank you for your response.
>> There are no other webservers running on this machine. There are 
>> other web apps as well, but the only way to access them is through 
>> myapp. So should I deploy myapp as the default app ?
> Yes, I think that it will make the rest easier.
> So do that, as per the instructions above, and then we will continue.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:
Thank you for the tidbit about how to reply :) So I used number 17 from the website and i
deployed the war file as the ROOT.war file.  What should the next steps be?

I thank you again for all of your help!
View raw message