You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Piotr Pawlowski <pi...@goyello.com> on 2011/08/22 12:51:40 UTC
Tomcat 7 + VirtualHost
Dear All,
I have following issue:
I have domain, example.com. My application is running under
http://example.com/myApp . Unfortunately every time I need to enter full url
to access my application (example.com/myApp). Is it possible to configure
tomcat in such way, that my application will start always when I enter only
domain name (example.com) ?
Thank you in advance for any tip or clue.
Best Regards
--
Piotr Pawlowski
Re: Tomcat 7 + VirtualHost
Posted by Piotr Pawlowski <pi...@goyello.com>.
Dear All,
Thank you for your tips and suggestions. I've convinced my developers, that
rewriting application will be better. Currently they are working on that, so
reported issue not exists anymore.
Thanks again for your time.
Best Regards
--
Piotr Pawlowski
On 22 August 2011 16:14, André Warnier <aw...@ice-sa.com> wrote:
> Piotr Pawlowski wrote:
>
>> Dear All,
>>
>> Making my application as ROOT app won't solve the problem because I will
>> have application running under example.com , not example.com/myApp. A lot
>> of
>> hyperlinks are hard-coded in it.
>>
>
> That is a very bad design, which will cost you a lot of lost time in the
> future.
>
>
> Changing this will costs my developers
>
>> around 4hours of coding and testing which we currently don't have.
>>
>
> But it will cost you much, much more in the future, when you have even more
> pages like that.
>
> Your current issue is a perfect example : just trying to change the initial
> URL leading to your application, on the same server, is already complicated.
>
> Now think what it would cost to install it on another system which already
> uses the name "myApp". Or that you need to give a copy to a graphic
> designer, to improve the looks.
> Or to run this behind a proxy or load-balancer.
>
> Spend the 4 hours now, and you will thank yourself many times in the
> future.
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.**apache.org<us...@tomcat.apache.org>
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
Re: Tomcat 7 + VirtualHost
Posted by André Warnier <aw...@ice-sa.com>.
Piotr Pawlowski wrote:
> Dear All,
>
> Making my application as ROOT app won't solve the problem because I will
> have application running under example.com , not example.com/myApp. A lot of
> hyperlinks are hard-coded in it.
That is a very bad design, which will cost you a lot of lost time in the future.
Changing this will costs my developers
> around 4hours of coding and testing which we currently don't have.
But it will cost you much, much more in the future, when you have even more pages like that.
Your current issue is a perfect example : just trying to change the initial URL leading to
your application, on the same server, is already complicated.
Now think what it would cost to install it on another system which already uses the name
"myApp". Or that you need to give a copy to a graphic designer, to improve the looks.
Or to run this behind a proxy or load-balancer.
Spend the 4 hours now, and you will thank yourself many times in the future.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 7 + VirtualHost
Posted by Konstantin Kolinko <kn...@gmail.com>.
2011/8/22 Piotr Pawlowski <pi...@goyello.com>:
> Maybe I didn't describe it clearly - I need some kind of redirection from
> example.com to example.com/myApp .
ROOT/index.jsp:
[[[
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:redirect url="/myApp/" />
]]]
+ add standard taglib to the ROOT webapp
http://tomcat.apache.org/taglibs/standard/
or call response.sendRedirect() directly.
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 7 + VirtualHost
Posted by Pid <pi...@pidster.com>.
On 22/08/2011 13:15, Piotr Pawlowski wrote:
> A lot of hyperlinks are hard-coded in it.
That can't possibly go wrong...
p
Re: Tomcat 7 + VirtualHost
Posted by Piotr Pawlowski <pi...@goyello.com>.
Dear All,
Making my application as ROOT app won't solve the problem because I will
have application running under example.com , not example.com/myApp. A lot of
hyperlinks are hard-coded in it. Changing this will costs my developers
around 4hours of coding and testing which we currently don't have. That is
why I woul prefer changing Tomcat configuration rather than rewriting
application.
Maybe I didn't describe it clearly - I need some kind of redirection from
example.com to example.com/myApp .
Best Regards
--
Piotr Pawlowski
Re: Tomcat 7 + VirtualHost
Posted by Pid <pi...@pidster.com>.
On 22/08/2011 11:51, Piotr Pawlowski wrote:
> Dear All,
>
> I have following issue:
> I have domain, example.com. My application is running under
> http://example.com/myApp . Unfortunately every time I need to enter full url
> to access my application (example.com/myApp). Is it possible to configure
> tomcat in such way, that my application will start always when I enter only
> domain name (example.com) ?
> Thank you in advance for any tip or clue.
Make it the ROOT* application. See the Tomcat docs for more details.
http://tomcat.apache.org/
p
* Note the uppercase - it matters.