You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Nam Pham <na...@vistaprojects.com> on 2014/04/23 18:40:47 UTC

Tomcat 7.0.50 - URL Questions

Hi,

After searching online(seeing mixed results), and searching through the Wiki, I was hoping someone can confirm how I can do the following:

I installed my app, and it has a default URL of:
http://something:port/webappname/morestuff.action

I was wondering if it was possible to setup Tomcat so I could browse to here:
http://something

and have it either point at my webapp or redirect to my webapp.

Thanks,
Nam


Re: Tomcat 7.0.50 - URL Questions

Posted by André Warnier <aw...@ice-sa.com>.
Nam Pham wrote:
> Hi,
> 
> After searching online(seeing mixed results), and searching through the Wiki, I was hoping someone can confirm how I can do the following:
> 
> I installed my app, and it has a default URL of:
> http://something:port/webappname/morestuff.action
> 
> I was wondering if it was possible to setup Tomcat so I could browse to here:
> http://something
> 
> and have it either point at my webapp or redirect to my webapp.
> 

Yes, check the FAQ :
http://wiki.apache.org/tomcat/HowTo#How_do_I_make_my_web_application_be_the_Tomcat_default_application.3F

and ask back here if you have any problem with that.


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


Re: Tomcat 7.0.50 - URL Questions

Posted by André Warnier <aw...@ice-sa.com>.
J Java wrote:
> Chris,
> 
> Whoever you are
>>> I am just a relatively novice Java developer. and certainly not as
> famous or an expert like
> you.
> 
> The correct way of doing things is to make re-name your web
> application ROOT and deploy it as such. If you want to get rid of the
> port number, you'll have to run Tomcat on port 80 instead of 8080 or
> 86 or whatever
> 
>>> Ok. but what if i have to do this for multiple applications on a single
> tomcat. I guess tomcat can have only one default ROOT app. right?

Well, yes. It would be a bit confusing otherwise.

>>> Also general practice is to run tomcat behind HTTP and not expose it
> directly to internet.

It is an often-used configuration, but not a general practice.
Tomcat is not shy, and does not need to hide behind http. It can be its own front-end 
webserver on the WWW.
People who put a httpd in front of it do it for a reason, otherwise it would be a waste of 
cpu cycles.



  Please forgive me if my assumptions are absurd
> 
> Thanks,
> Shailesh.
> 
> 
> 
> On Thu, Apr 24, 2014 at 9:02 PM, Christopher Schultz <
> chris@christopherschultz.net> wrote:
> 
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA256
>>
>> Whoever you are,
>>
>> On 4/23/14, 7:57 PM, J Java wrote:
>>> After searching online(seeing mixed results), and searching through
>>> the Wiki, I was hoping someone can confirm how I can do the
>>> following:
>>>
>>> I installed my app, and it has a default URL of:
>>> http://something:port/webappname/morestuff.action
>>>
>>> I was wondering if it was possible to setup Tomcat so I could
>>> browse to here: http://something
>>>
>>> and have it either point at my webapp or redirect to my webapp.
>>>
>>>>> You can do this by running your tomcat behind HTTP. I had put
>>>>> this question on SO please find below the link
>> http://stackoverflow.com/questions/22040995/show-home-page-through-tomcat-without-changing-url/22051976#22051976
>>>  please let me know if this helps.
>>>
>>> Chris,
>>>
>>> can you please put some more light on what I have done is correct
>>> way of doing it or not. I did it because i wanted to have landing
>>> page of my website which had dynamic content to be loaded and i
>>> didn't want to use redirection to any other url.
>> The correct way of doing things is to make re-name your web
>> application ROOT and deploy it as such. If you want to get rid of the
>> port number, you'll have to run Tomcat on port 80 instead of 8080 or
>> 86 or whatever.
>>
>> - -chris
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1
>> Comment: GPGTools - http://gpgtools.org
>> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>>
>> iQIcBAEBCAAGBQJTWS6HAAoJEBzwKT+lPKRYNXUQAIGN75kNAMDFLg94LM2FNamC
>> YwZ2ZO43zuwHlNeqnQD/0xQBW/e1kEDNr7lOjx7bJ33kKRB2WF1dUQ+rb8Xh1gJZ
>> Zezo/tHSxgCTTgpnfW/4/rQlVyQRWZVH30n7H0V7eIORTC2PGA6Qh0WjnkljVmcs
>> zog4ssPolCV6oB/3N8CjzMkSw1AzCc9nL2dkTm15QrLyvv5jbPOGhXvMCTmP3FVE
>> JUcnsvuXHMLzM0I6Ned2un9OFoJeO1pqzJ7pmRrvQqYZSJi3cHB9oGEaqXax259y
>> pbGXKZrn0ZmRJyGtugeDzJqh9eXRfdTCxFeYuIu3klDOX80+pxK/0mHE4yXILEsX
>> zF64hK66oF8mXaAbdci62e4EKg0tNxeFTSm1FEOPkwcY6NxOFVXEz5Z/FP+WOfgz
>> mow9r6MjZnlks5YPDs2ZDi5gvbOcslxIyYGTLTGq72TLOJ6pzM+Dyr3fKwJEbQ9X
>> DB2vD9FvjZyj+p29faBDT3Q2wTrPid9Vk9+/A3Aqymop+StdCGKdn2Q/+QFwg/z1
>> Ryt2ktndmuiDSewIcJ83lI6k83fzu+ANYqFwJeIvj/P4coRqz6eq2jmyj4YOe/TX
>> XhRgm47ElDNulikQJAg7+osNcGqA2xzvcYEQmK4rS5+bXl+ogMtIbEy8gLdOBRgj
>> GSpT2OlqbV+ZI6BVQVXx
>> =Ks31
>> -----END PGP SIGNATURE-----
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
> 


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


Re: Tomcat 7.0.50 - URL Questions

Posted by J Java <jf...@gmail.com>.
Each virtual host can only have one default (ROOT) web app. Read about
virtual hosting in the Users Guide.

>> Also even if its not the standard and right thing the way I have handled
it. does it have any pitfalls?

thanks,
Shailesh


On Thu, Apr 24, 2014 at 9:33 PM, J Java <jf...@gmail.com> wrote:

>
>
> I'm just getting confused. You first posted as Nam Pham ("signed" as
> "Nam"). Then as J Java. And your StackOverflow question says Shailesh
> Vaishampayan. I can't keep up.
>
> >> Sorry for any confusion. Maybe I made a mistake in posting the reply.
> But Nam is the original user who posted it . I just replied to it.
>      My name is Shailesh Vaishampayan, and I use different email just to
> keep professional emails seperate from personal emails and I have it
> registered as J Java on gmail.
>
> Each virtual host can only have one default (ROOT) web app. Read about
> virtual hosting in the Users Guide.
>
> >> Ok. thanks will have a look thanks.
>
> There is no specific reason to front Tomcat with httpd if you only
> need one instance of Tomcat. Most people need multiple instances for
> various reasons, and since Tomcat doesn't do reverse-proxying,
> generally people use httpd or something similar out front.
>
> >> right. but i do have multiple instances. so i guess my decision to use
> front server is correct.
> >>Please let me know can I do this with Tomcat virtual hosting even if its
> behind HTTPD.
>
> Thanks,
> Shailesh.
>
>
>
> On Thu, Apr 24, 2014 at 9:25 PM, Christopher Schultz <
> chris@christopherschultz.net> wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA256
>>
>> To whom it may concern,
>>
>> On 4/24/14, 11:44 AM, J Java wrote:
>> >> Whoever you are
>> > I am just a relatively novice Java developer. and certainly not as
>> >  famous or an expert like you.
>>
>> I'm just getting confused. You first posted as Nam Pham ("signed" as
>> "Nam"). Then as J Java. And your StackOverflow question says Shailesh
>> Vaishampayan. I can't keep up.
>>
>> >> The correct way of doing things is to make re-name your web
>> >> application ROOT and deploy it as such. If you want to get rid of
>> >> the port number, you'll have to run Tomcat on port 80 instead of
>> >> 8080 or 86 or whatever
>> >
>> > Ok. but what if i have to do this for multiple applications on a
>> > single tomcat. I guess tomcat can have only one default ROOT app.
>> > right?
>>
>> Each virtual host can only have one default (ROOT) web app. Read about
>> virtual hosting in the Users Guide.
>>
>> > Also general practice is to run tomcat behind HTTP and not expose
>> > it directly to internet. Please forgive me if my assumptions are
>> > absurd
>>
>> There is no specific reason to front Tomcat with httpd if you only
>> need one instance of Tomcat. Most people need multiple instances for
>> various reasons, and since Tomcat doesn't do reverse-proxying,
>> generally people use httpd or something similar out front.
>>
>> - -chris
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1
>> Comment: GPGTools - http://gpgtools.org
>> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>>
>> iQIcBAEBCAAGBQJTWTP6AAoJEBzwKT+lPKRYAgsQALNU5fzFzTm/GMXstm5+PFLW
>> pxPkTC3XmaolNa1hh7UQQ50K2a1ehG3wqnrsrsWHNgbzLHPDveeicWq5mU2o0/B6
>> xVZF8KL1R8n8ZC63RkTnXoRrMOVfd/+3lp3jZsie7EmIchbVCzrrzniJqvHuPxg4
>> K1mdbtG6ZYI89WRh9wC1Yw4DXuCdpPdREE7kCQizSeYcMR08JknCnGxtkNn0kvJk
>> TEhpBFiTwgv+FerLTtAoX2+0gE4f6k1k5YpG7SCuXTIo29VpCgMAFu3Owp+7C25F
>> ZnkKqNXvr4AC1rW125fiVtHQ9s0AYls3F4KnZQW1g3MXsvWhYpqwV/3riCykJDgS
>> k4up1/DOyovKKKAP31trKdGbKRem3al1wPS2iTcnZaTmKzGNMfCvnjWxYuCFKkHD
>> SLnnkqEFEm1rId0Dnwm4vRDSgsBO2qTCCELTJeveOYkYRm9mZpE6DgmajKftyC/v
>> kjAUEoo6nIIUJfXHpcf24tDbzILzzKB4gwT8aiTgePv2BSABma9qb/10d1eVOZoV
>> UkYag4Yvtm/vBsazKpCeFhgLjWDLzC4gKMeL29cHgvRRmVQvwUZuhmzb3hRIBHIH
>> 5VhHAbwI789JvpBHM9Xuevq8umaBfXkFf5vfDbn/R/6++bl8Fx6+vaMHe0ZSaoHf
>> wvrqFn3UFxYV4oyac3nL
>> =vCAS
>> -----END PGP SIGNATURE-----
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>

Re: Tomcat 7.0.50 - URL Questions

Posted by J Java <jf...@gmail.com>.
I'm not sure I understand what you are proposing.

>> I have mixed up two reverse proxy mechanoisms(mod_proxy and mod_jk. I
hope as long as it is working it shouldn't be a problem.

Thanks,
Shailesh.


On Fri, Apr 25, 2014 at 10:37 AM, J Java <jf...@gmail.com> wrote:

> thanks Chris,
>
>
> On Fri, Apr 25, 2014 at 1:31 AM, Christopher Schultz <
> chris@christopherschultz.net> wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA256
>>
>> Shailesh,
>>
>> On 4/24/14, 12:03 PM, J Java wrote:
>> >> Each virtual host can only have one default (ROOT) web app. Read
>> >> about virtual hosting in the Users Guide.
>> >
>> > Ok. thanks will have a look thanks.
>> >
>> >> There is no specific reason to front Tomcat with httpd if you
>> >> only need one instance of Tomcat. Most people need multiple
>> >> instances for various reasons, and since Tomcat doesn't do
>> >> reverse-proxying, generally people use httpd or something similar
>> >> out front.
>> >
>> > right. but i do have multiple instances. so i guess my decision to
>> > use front server is correct. Please let me know can I do this with
>> > Tomcat virtual hosting even if its behind HTTPD.
>>
>> You have multiple instances of Tomcat? You never mentioned that
>> before. So, you will have multiple, virtual-hosted instances of
>> Tomcat? No problem.
>>
>> > Also even if its not the standard and right thing the way I have
>> > handled it. does it have any pitfalls?
>>
>> I'm not sure I understand what you are proposing.
>>
>> I have no concerns about using httpd to proxy to multiple instances of
>> Tomcat, whether they are configured for multiple virtual hosts or not.
>> You just need to keep everything straight in your mind when
>> configuring it all.
>>
>> httpd VH 1 -> Tomcat VH 1
>> httpd VH 2 -> Tomcat VH 2
>> httpd VH 3 -> Tomcat VH 3
>>
>> The locations of Tomcat VH 1, 2, and 3 are irrelevant: they can be
>> contained in any of your instances of Tomcat. You just need to make
>> sure that the connections for VH x are pointing to the correct
>> host:port that will get you the correct Tomcat VH instance.
>>
>> - -chris
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1
>> Comment: GPGTools - http://gpgtools.org
>> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>>
>> iQIcBAEBCAAGBQJTWW2yAAoJEBzwKT+lPKRYgZUP/116uBpR9899iGKY4Xlhw45p
>> 4p1Fx+QhAeWucsbGRiUBnJTyvlyt1LGKjSvyW44M2BHlMI+Hq9ZQGWgkYiHFTBot
>> OPIfKFcAPfN6XIXlVSpwG0mC4fhwOke5NbnJY92ArTfAuRADCw/j6GA7p899BBw7
>> UEyLQw3gV2OARPg0NsLHOQmQ55RJMI9+9RcPtz89/aSSZp0a7+7GW9gTaxgo5hgY
>> Rx3fiEfsoIB+MYpdmMnyKGcuDNX/eWaUtDk2DYfNf4p3sjQqc0wJMGzwfqWYuPFN
>> 7x4kG3RxNwHvi+KGbHA08Sfq1+k2gxuh4uz3FgnfRY7he6H/EJyp0TeOx/T14eGK
>> 5+UCuIdg0l5fmVGdUU4z+FH59ThNp/tKrxEWWTlGetBGNdpZf24eyURlQvRMy1O2
>> GO6zcfxicMgxDZYDNFD2H9ywAG/hbFfCgVVPREbIGZXkK+QqQ6psi1AsLQnrnDY6
>> P4WDA4JylmTNdic/6sCv3PnWGFhilPG2Dk4IuJzuR1qA6XwWRu2SFeDAm7v5AS3a
>> Fj8YwWh1ANiO5CWCgU4PJ6RlNqaZOzYCJzkAyBhGsUTEUu0+DU6Yuv/3IGRqLb3M
>> 5THqAK0LW6zV9R+UlDOFPo3y5TF4XlQJGuAX5ngcW1Mby7n/pzOV88cJFDutWbUX
>> S5enAc60lpqLvQziH87V
>> =M41n
>> -----END PGP SIGNATURE-----
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>

Re: Tomcat 7.0.50 - URL Questions

Posted by J Java <jf...@gmail.com>.
thanks Chris,


On Fri, Apr 25, 2014 at 1:31 AM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Shailesh,
>
> On 4/24/14, 12:03 PM, J Java wrote:
> >> Each virtual host can only have one default (ROOT) web app. Read
> >> about virtual hosting in the Users Guide.
> >
> > Ok. thanks will have a look thanks.
> >
> >> There is no specific reason to front Tomcat with httpd if you
> >> only need one instance of Tomcat. Most people need multiple
> >> instances for various reasons, and since Tomcat doesn't do
> >> reverse-proxying, generally people use httpd or something similar
> >> out front.
> >
> > right. but i do have multiple instances. so i guess my decision to
> > use front server is correct. Please let me know can I do this with
> > Tomcat virtual hosting even if its behind HTTPD.
>
> You have multiple instances of Tomcat? You never mentioned that
> before. So, you will have multiple, virtual-hosted instances of
> Tomcat? No problem.
>
> > Also even if its not the standard and right thing the way I have
> > handled it. does it have any pitfalls?
>
> I'm not sure I understand what you are proposing.
>
> I have no concerns about using httpd to proxy to multiple instances of
> Tomcat, whether they are configured for multiple virtual hosts or not.
> You just need to keep everything straight in your mind when
> configuring it all.
>
> httpd VH 1 -> Tomcat VH 1
> httpd VH 2 -> Tomcat VH 2
> httpd VH 3 -> Tomcat VH 3
>
> The locations of Tomcat VH 1, 2, and 3 are irrelevant: they can be
> contained in any of your instances of Tomcat. You just need to make
> sure that the connections for VH x are pointing to the correct
> host:port that will get you the correct Tomcat VH instance.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBCAAGBQJTWW2yAAoJEBzwKT+lPKRYgZUP/116uBpR9899iGKY4Xlhw45p
> 4p1Fx+QhAeWucsbGRiUBnJTyvlyt1LGKjSvyW44M2BHlMI+Hq9ZQGWgkYiHFTBot
> OPIfKFcAPfN6XIXlVSpwG0mC4fhwOke5NbnJY92ArTfAuRADCw/j6GA7p899BBw7
> UEyLQw3gV2OARPg0NsLHOQmQ55RJMI9+9RcPtz89/aSSZp0a7+7GW9gTaxgo5hgY
> Rx3fiEfsoIB+MYpdmMnyKGcuDNX/eWaUtDk2DYfNf4p3sjQqc0wJMGzwfqWYuPFN
> 7x4kG3RxNwHvi+KGbHA08Sfq1+k2gxuh4uz3FgnfRY7he6H/EJyp0TeOx/T14eGK
> 5+UCuIdg0l5fmVGdUU4z+FH59ThNp/tKrxEWWTlGetBGNdpZf24eyURlQvRMy1O2
> GO6zcfxicMgxDZYDNFD2H9ywAG/hbFfCgVVPREbIGZXkK+QqQ6psi1AsLQnrnDY6
> P4WDA4JylmTNdic/6sCv3PnWGFhilPG2Dk4IuJzuR1qA6XwWRu2SFeDAm7v5AS3a
> Fj8YwWh1ANiO5CWCgU4PJ6RlNqaZOzYCJzkAyBhGsUTEUu0+DU6Yuv/3IGRqLb3M
> 5THqAK0LW6zV9R+UlDOFPo3y5TF4XlQJGuAX5ngcW1Mby7n/pzOV88cJFDutWbUX
> S5enAc60lpqLvQziH87V
> =M41n
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Tomcat 7.0.50 - URL Questions

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Shailesh,

On 4/24/14, 12:03 PM, J Java wrote:
>> Each virtual host can only have one default (ROOT) web app. Read
>> about virtual hosting in the Users Guide.
> 
> Ok. thanks will have a look thanks.
> 
>> There is no specific reason to front Tomcat with httpd if you
>> only need one instance of Tomcat. Most people need multiple
>> instances for various reasons, and since Tomcat doesn't do
>> reverse-proxying, generally people use httpd or something similar
>> out front.
> 
> right. but i do have multiple instances. so i guess my decision to 
> use front server is correct. Please let me know can I do this with 
> Tomcat virtual hosting even if its behind HTTPD.

You have multiple instances of Tomcat? You never mentioned that
before. So, you will have multiple, virtual-hosted instances of
Tomcat? No problem.

> Also even if its not the standard and right thing the way I have 
> handled it. does it have any pitfalls?

I'm not sure I understand what you are proposing.

I have no concerns about using httpd to proxy to multiple instances of
Tomcat, whether they are configured for multiple virtual hosts or not.
You just need to keep everything straight in your mind when
configuring it all.

httpd VH 1 -> Tomcat VH 1
httpd VH 2 -> Tomcat VH 2
httpd VH 3 -> Tomcat VH 3

The locations of Tomcat VH 1, 2, and 3 are irrelevant: they can be
contained in any of your instances of Tomcat. You just need to make
sure that the connections for VH x are pointing to the correct
host:port that will get you the correct Tomcat VH instance.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJTWW2yAAoJEBzwKT+lPKRYgZUP/116uBpR9899iGKY4Xlhw45p
4p1Fx+QhAeWucsbGRiUBnJTyvlyt1LGKjSvyW44M2BHlMI+Hq9ZQGWgkYiHFTBot
OPIfKFcAPfN6XIXlVSpwG0mC4fhwOke5NbnJY92ArTfAuRADCw/j6GA7p899BBw7
UEyLQw3gV2OARPg0NsLHOQmQ55RJMI9+9RcPtz89/aSSZp0a7+7GW9gTaxgo5hgY
Rx3fiEfsoIB+MYpdmMnyKGcuDNX/eWaUtDk2DYfNf4p3sjQqc0wJMGzwfqWYuPFN
7x4kG3RxNwHvi+KGbHA08Sfq1+k2gxuh4uz3FgnfRY7he6H/EJyp0TeOx/T14eGK
5+UCuIdg0l5fmVGdUU4z+FH59ThNp/tKrxEWWTlGetBGNdpZf24eyURlQvRMy1O2
GO6zcfxicMgxDZYDNFD2H9ywAG/hbFfCgVVPREbIGZXkK+QqQ6psi1AsLQnrnDY6
P4WDA4JylmTNdic/6sCv3PnWGFhilPG2Dk4IuJzuR1qA6XwWRu2SFeDAm7v5AS3a
Fj8YwWh1ANiO5CWCgU4PJ6RlNqaZOzYCJzkAyBhGsUTEUu0+DU6Yuv/3IGRqLb3M
5THqAK0LW6zV9R+UlDOFPo3y5TF4XlQJGuAX5ngcW1Mby7n/pzOV88cJFDutWbUX
S5enAc60lpqLvQziH87V
=M41n
-----END PGP SIGNATURE-----

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


Re: Tomcat 7.0.50 - URL Questions

Posted by J Java <jf...@gmail.com>.
I'm just getting confused. You first posted as Nam Pham ("signed" as
"Nam"). Then as J Java. And your StackOverflow question says Shailesh
Vaishampayan. I can't keep up.

>> Sorry for any confusion. Maybe I made a mistake in posting the reply.
But Nam is the original user who posted it . I just replied to it.
     My name is Shailesh Vaishampayan, and I use different email just to
keep professional emails seperate from personal emails and I have it
registered as J Java on gmail.

Each virtual host can only have one default (ROOT) web app. Read about
virtual hosting in the Users Guide.

>> Ok. thanks will have a look thanks.

There is no specific reason to front Tomcat with httpd if you only
need one instance of Tomcat. Most people need multiple instances for
various reasons, and since Tomcat doesn't do reverse-proxying,
generally people use httpd or something similar out front.

>> right. but i do have multiple instances. so i guess my decision to use
front server is correct.
>>Please let me know can I do this with Tomcat virtual hosting even if its
behind HTTPD.

Thanks,
Shailesh.



On Thu, Apr 24, 2014 at 9:25 PM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> To whom it may concern,
>
> On 4/24/14, 11:44 AM, J Java wrote:
> >> Whoever you are
> > I am just a relatively novice Java developer. and certainly not as
> >  famous or an expert like you.
>
> I'm just getting confused. You first posted as Nam Pham ("signed" as
> "Nam"). Then as J Java. And your StackOverflow question says Shailesh
> Vaishampayan. I can't keep up.
>
> >> The correct way of doing things is to make re-name your web
> >> application ROOT and deploy it as such. If you want to get rid of
> >> the port number, you'll have to run Tomcat on port 80 instead of
> >> 8080 or 86 or whatever
> >
> > Ok. but what if i have to do this for multiple applications on a
> > single tomcat. I guess tomcat can have only one default ROOT app.
> > right?
>
> Each virtual host can only have one default (ROOT) web app. Read about
> virtual hosting in the Users Guide.
>
> > Also general practice is to run tomcat behind HTTP and not expose
> > it directly to internet. Please forgive me if my assumptions are
> > absurd
>
> There is no specific reason to front Tomcat with httpd if you only
> need one instance of Tomcat. Most people need multiple instances for
> various reasons, and since Tomcat doesn't do reverse-proxying,
> generally people use httpd or something similar out front.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBCAAGBQJTWTP6AAoJEBzwKT+lPKRYAgsQALNU5fzFzTm/GMXstm5+PFLW
> pxPkTC3XmaolNa1hh7UQQ50K2a1ehG3wqnrsrsWHNgbzLHPDveeicWq5mU2o0/B6
> xVZF8KL1R8n8ZC63RkTnXoRrMOVfd/+3lp3jZsie7EmIchbVCzrrzniJqvHuPxg4
> K1mdbtG6ZYI89WRh9wC1Yw4DXuCdpPdREE7kCQizSeYcMR08JknCnGxtkNn0kvJk
> TEhpBFiTwgv+FerLTtAoX2+0gE4f6k1k5YpG7SCuXTIo29VpCgMAFu3Owp+7C25F
> ZnkKqNXvr4AC1rW125fiVtHQ9s0AYls3F4KnZQW1g3MXsvWhYpqwV/3riCykJDgS
> k4up1/DOyovKKKAP31trKdGbKRem3al1wPS2iTcnZaTmKzGNMfCvnjWxYuCFKkHD
> SLnnkqEFEm1rId0Dnwm4vRDSgsBO2qTCCELTJeveOYkYRm9mZpE6DgmajKftyC/v
> kjAUEoo6nIIUJfXHpcf24tDbzILzzKB4gwT8aiTgePv2BSABma9qb/10d1eVOZoV
> UkYag4Yvtm/vBsazKpCeFhgLjWDLzC4gKMeL29cHgvRRmVQvwUZuhmzb3hRIBHIH
> 5VhHAbwI789JvpBHM9Xuevq8umaBfXkFf5vfDbn/R/6++bl8Fx6+vaMHe0ZSaoHf
> wvrqFn3UFxYV4oyac3nL
> =vCAS
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Tomcat 7.0.50 - URL Questions

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

To whom it may concern,

On 4/24/14, 11:44 AM, J Java wrote:
>> Whoever you are
> I am just a relatively novice Java developer. and certainly not as
>  famous or an expert like you.

I'm just getting confused. You first posted as Nam Pham ("signed" as
"Nam"). Then as J Java. And your StackOverflow question says Shailesh
Vaishampayan. I can't keep up.

>> The correct way of doing things is to make re-name your web 
>> application ROOT and deploy it as such. If you want to get rid of
>> the port number, you'll have to run Tomcat on port 80 instead of
>> 8080 or 86 or whatever
> 
> Ok. but what if i have to do this for multiple applications on a
> single tomcat. I guess tomcat can have only one default ROOT app.
> right?

Each virtual host can only have one default (ROOT) web app. Read about
virtual hosting in the Users Guide.

> Also general practice is to run tomcat behind HTTP and not expose
> it directly to internet. Please forgive me if my assumptions are
> absurd

There is no specific reason to front Tomcat with httpd if you only
need one instance of Tomcat. Most people need multiple instances for
various reasons, and since Tomcat doesn't do reverse-proxying,
generally people use httpd or something similar out front.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJTWTP6AAoJEBzwKT+lPKRYAgsQALNU5fzFzTm/GMXstm5+PFLW
pxPkTC3XmaolNa1hh7UQQ50K2a1ehG3wqnrsrsWHNgbzLHPDveeicWq5mU2o0/B6
xVZF8KL1R8n8ZC63RkTnXoRrMOVfd/+3lp3jZsie7EmIchbVCzrrzniJqvHuPxg4
K1mdbtG6ZYI89WRh9wC1Yw4DXuCdpPdREE7kCQizSeYcMR08JknCnGxtkNn0kvJk
TEhpBFiTwgv+FerLTtAoX2+0gE4f6k1k5YpG7SCuXTIo29VpCgMAFu3Owp+7C25F
ZnkKqNXvr4AC1rW125fiVtHQ9s0AYls3F4KnZQW1g3MXsvWhYpqwV/3riCykJDgS
k4up1/DOyovKKKAP31trKdGbKRem3al1wPS2iTcnZaTmKzGNMfCvnjWxYuCFKkHD
SLnnkqEFEm1rId0Dnwm4vRDSgsBO2qTCCELTJeveOYkYRm9mZpE6DgmajKftyC/v
kjAUEoo6nIIUJfXHpcf24tDbzILzzKB4gwT8aiTgePv2BSABma9qb/10d1eVOZoV
UkYag4Yvtm/vBsazKpCeFhgLjWDLzC4gKMeL29cHgvRRmVQvwUZuhmzb3hRIBHIH
5VhHAbwI789JvpBHM9Xuevq8umaBfXkFf5vfDbn/R/6++bl8Fx6+vaMHe0ZSaoHf
wvrqFn3UFxYV4oyac3nL
=vCAS
-----END PGP SIGNATURE-----

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


Re: Tomcat 7.0.50 - URL Questions

Posted by J Java <jf...@gmail.com>.
Chris,

Whoever you are
>> I am just a relatively novice Java developer. and certainly not as
famous or an expert like
you.

The correct way of doing things is to make re-name your web
application ROOT and deploy it as such. If you want to get rid of the
port number, you'll have to run Tomcat on port 80 instead of 8080 or
86 or whatever

>> Ok. but what if i have to do this for multiple applications on a single
tomcat. I guess tomcat can have only one default ROOT app. right?
>> Also general practice is to run tomcat behind HTTP and not expose it
directly to internet. Please forgive me if my assumptions are absurd

Thanks,
Shailesh.



On Thu, Apr 24, 2014 at 9:02 PM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Whoever you are,
>
> On 4/23/14, 7:57 PM, J Java wrote:
> > After searching online(seeing mixed results), and searching through
> > the Wiki, I was hoping someone can confirm how I can do the
> > following:
> >
> > I installed my app, and it has a default URL of:
> > http://something:port/webappname/morestuff.action
> >
> > I was wondering if it was possible to setup Tomcat so I could
> > browse to here: http://something
> >
> > and have it either point at my webapp or redirect to my webapp.
> >
> >>> You can do this by running your tomcat behind HTTP. I had put
> >>> this question on SO please find below the link
> >
> http://stackoverflow.com/questions/22040995/show-home-page-through-tomcat-without-changing-url/22051976#22051976
> >
> >  please let me know if this helps.
> >
> > Chris,
> >
> > can you please put some more light on what I have done is correct
> > way of doing it or not. I did it because i wanted to have landing
> > page of my website which had dynamic content to be loaded and i
> > didn't want to use redirection to any other url.
>
> The correct way of doing things is to make re-name your web
> application ROOT and deploy it as such. If you want to get rid of the
> port number, you'll have to run Tomcat on port 80 instead of 8080 or
> 86 or whatever.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBCAAGBQJTWS6HAAoJEBzwKT+lPKRYNXUQAIGN75kNAMDFLg94LM2FNamC
> YwZ2ZO43zuwHlNeqnQD/0xQBW/e1kEDNr7lOjx7bJ33kKRB2WF1dUQ+rb8Xh1gJZ
> Zezo/tHSxgCTTgpnfW/4/rQlVyQRWZVH30n7H0V7eIORTC2PGA6Qh0WjnkljVmcs
> zog4ssPolCV6oB/3N8CjzMkSw1AzCc9nL2dkTm15QrLyvv5jbPOGhXvMCTmP3FVE
> JUcnsvuXHMLzM0I6Ned2un9OFoJeO1pqzJ7pmRrvQqYZSJi3cHB9oGEaqXax259y
> pbGXKZrn0ZmRJyGtugeDzJqh9eXRfdTCxFeYuIu3klDOX80+pxK/0mHE4yXILEsX
> zF64hK66oF8mXaAbdci62e4EKg0tNxeFTSm1FEOPkwcY6NxOFVXEz5Z/FP+WOfgz
> mow9r6MjZnlks5YPDs2ZDi5gvbOcslxIyYGTLTGq72TLOJ6pzM+Dyr3fKwJEbQ9X
> DB2vD9FvjZyj+p29faBDT3Q2wTrPid9Vk9+/A3Aqymop+StdCGKdn2Q/+QFwg/z1
> Ryt2ktndmuiDSewIcJ83lI6k83fzu+ANYqFwJeIvj/P4coRqz6eq2jmyj4YOe/TX
> XhRgm47ElDNulikQJAg7+osNcGqA2xzvcYEQmK4rS5+bXl+ogMtIbEy8gLdOBRgj
> GSpT2OlqbV+ZI6BVQVXx
> =Ks31
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Tomcat 7.0.50 - URL Questions

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Whoever you are,

On 4/23/14, 7:57 PM, J Java wrote:
> After searching online(seeing mixed results), and searching through
> the Wiki, I was hoping someone can confirm how I can do the
> following:
> 
> I installed my app, and it has a default URL of: 
> http://something:port/webappname/morestuff.action
> 
> I was wondering if it was possible to setup Tomcat so I could
> browse to here: http://something
> 
> and have it either point at my webapp or redirect to my webapp.
> 
>>> You can do this by running your tomcat behind HTTP. I had put
>>> this question on SO please find below the link
> http://stackoverflow.com/questions/22040995/show-home-page-through-tomcat-without-changing-url/22051976#22051976
>
>  please let me know if this helps.
> 
> Chris,
> 
> can you please put some more light on what I have done is correct
> way of doing it or not. I did it because i wanted to have landing
> page of my website which had dynamic content to be loaded and i
> didn't want to use redirection to any other url.

The correct way of doing things is to make re-name your web
application ROOT and deploy it as such. If you want to get rid of the
port number, you'll have to run Tomcat on port 80 instead of 8080 or
86 or whatever.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJTWS6HAAoJEBzwKT+lPKRYNXUQAIGN75kNAMDFLg94LM2FNamC
YwZ2ZO43zuwHlNeqnQD/0xQBW/e1kEDNr7lOjx7bJ33kKRB2WF1dUQ+rb8Xh1gJZ
Zezo/tHSxgCTTgpnfW/4/rQlVyQRWZVH30n7H0V7eIORTC2PGA6Qh0WjnkljVmcs
zog4ssPolCV6oB/3N8CjzMkSw1AzCc9nL2dkTm15QrLyvv5jbPOGhXvMCTmP3FVE
JUcnsvuXHMLzM0I6Ned2un9OFoJeO1pqzJ7pmRrvQqYZSJi3cHB9oGEaqXax259y
pbGXKZrn0ZmRJyGtugeDzJqh9eXRfdTCxFeYuIu3klDOX80+pxK/0mHE4yXILEsX
zF64hK66oF8mXaAbdci62e4EKg0tNxeFTSm1FEOPkwcY6NxOFVXEz5Z/FP+WOfgz
mow9r6MjZnlks5YPDs2ZDi5gvbOcslxIyYGTLTGq72TLOJ6pzM+Dyr3fKwJEbQ9X
DB2vD9FvjZyj+p29faBDT3Q2wTrPid9Vk9+/A3Aqymop+StdCGKdn2Q/+QFwg/z1
Ryt2ktndmuiDSewIcJ83lI6k83fzu+ANYqFwJeIvj/P4coRqz6eq2jmyj4YOe/TX
XhRgm47ElDNulikQJAg7+osNcGqA2xzvcYEQmK4rS5+bXl+ogMtIbEy8gLdOBRgj
GSpT2OlqbV+ZI6BVQVXx
=Ks31
-----END PGP SIGNATURE-----

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


Re: Tomcat 7.0.50 - URL Questions

Posted by J Java <jf...@gmail.com>.
After searching online(seeing mixed results), and searching through the
Wiki, I was hoping someone can confirm how I can do the following:

I installed my app, and it has a default URL of:
http://something:port/webappname/morestuff.action

I was wondering if it was possible to setup Tomcat so I could browse to
here:
http://something

and have it either point at my webapp or redirect to my webapp.

>> You can do this by running your tomcat behind HTTP.
>> I had put this question on SO please find below the link
http://stackoverflow.com/questions/22040995/show-home-page-through-tomcat-without-changing-url/22051976#22051976

please let me know if this helps.

Chris,

 can you please put some more light on what I have done is correct way of
doing it or not. I did it because i wanted to have landing page of my
website which had dynamic content to be loaded and i didn't want to use
redirection to any other url.

Thanks,
Shailesh.


On Wed, Apr 23, 2014 at 11:15 PM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Nam,
>
> On 4/23/14, 12:40 PM, Nam Pham wrote:
> > After searching online(seeing mixed results), and searching through
> > the Wiki, I was hoping someone can confirm how I can do the
> > following:
> >
> > I installed my app, and it has a default URL of:
> > http://something:port/webappname/morestuff.action
> >
> > I was wondering if it was possible to setup Tomcat so I could
> > browse to here: http://something
> >
> > and have it either point at my webapp or redirect to my webapp.
>
> André has half the solution: making your application to be the
> default. There is another piece of the puzzle, which is to eliminate
> the port number. Unless the port number is 80 (for HTTP) or 443 (for
> HTTPS), then you will require the port number in the URL.
>
> So, the simple answer is that you have to change the port number your
> connector is listening to. The longer answer is that sometimes that's
> not terribly convenient due to operating system restrictions and other
> environmental factors.
>
> If you can't get it working, tell us about your environment, perhaps
> we can help.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBCAAGBQJTV/wmAAoJEBzwKT+lPKRYfAYQAJYQA3cdrnMjD1YxkiH/VQPm
> JfotzKK5J1GZljxpiLGy4RKq+zmqmmjYh8i176pVufx+S6r8AILqRcPiLNFc9Wwp
> BfiPeaPOBAiOY4m2Y0jwS1CfT3sECDOF8azJuIq46iMVu4n9kknSzutjZ7M9rG9w
> F4l9M2JGJ81n9nmeTg4zIzqjm2GyhFezSNJ+lrEtqZmD9u51tmsh7HPTOskSS17d
> HfDS6o1rTLq74uvi8IytHwa6a42TXg9d6jWhTEM9SugtP8ixnwV8/hA1oYfv7ON8
> yhRdaDRdHva6siSxpKApx+gARyCTTnsFTyyWVcJiTZeHmaRZ+/5FiXtyC+LRFC+P
> DumGlFeopXL2d/WjGCUBJVvLsuF118eS0qPQd3uGobyXO0O+CwkSdGgiy0FST5ah
> N/cqC6PE2FbpuFuvS9/O41y3NUdqpH2vXohBKMoEjw3XcAnL2qooAu5gWpWCQsfX
> SAV1EfT77kryd7FszUw10B6aFtKkfyFwqxN2Ec3DLxUScNAfwsm/TEv1zERvD0ly
> sJaJDcAYYuW7nwKN7zINAX34jMvT4K1Ipjsi/swukchMlP8drXsWSRanBk/UwMZh
> ntqP+4MEMctCtG1AnZ17a7nKck/CnAVR4iQRxsLS2jYrU5mPrFTKTkzrK/MhN4TC
> yGB0ewxfd2VxB45YMivt
> =d+D4
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Tomcat 7.0.50 - URL Questions

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Nam,

On 4/23/14, 12:40 PM, Nam Pham wrote:
> After searching online(seeing mixed results), and searching through
> the Wiki, I was hoping someone can confirm how I can do the
> following:
> 
> I installed my app, and it has a default URL of: 
> http://something:port/webappname/morestuff.action
> 
> I was wondering if it was possible to setup Tomcat so I could
> browse to here: http://something
> 
> and have it either point at my webapp or redirect to my webapp.

André has half the solution: making your application to be the
default. There is another piece of the puzzle, which is to eliminate
the port number. Unless the port number is 80 (for HTTP) or 443 (for
HTTPS), then you will require the port number in the URL.

So, the simple answer is that you have to change the port number your
connector is listening to. The longer answer is that sometimes that's
not terribly convenient due to operating system restrictions and other
environmental factors.

If you can't get it working, tell us about your environment, perhaps
we can help.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJTV/wmAAoJEBzwKT+lPKRYfAYQAJYQA3cdrnMjD1YxkiH/VQPm
JfotzKK5J1GZljxpiLGy4RKq+zmqmmjYh8i176pVufx+S6r8AILqRcPiLNFc9Wwp
BfiPeaPOBAiOY4m2Y0jwS1CfT3sECDOF8azJuIq46iMVu4n9kknSzutjZ7M9rG9w
F4l9M2JGJ81n9nmeTg4zIzqjm2GyhFezSNJ+lrEtqZmD9u51tmsh7HPTOskSS17d
HfDS6o1rTLq74uvi8IytHwa6a42TXg9d6jWhTEM9SugtP8ixnwV8/hA1oYfv7ON8
yhRdaDRdHva6siSxpKApx+gARyCTTnsFTyyWVcJiTZeHmaRZ+/5FiXtyC+LRFC+P
DumGlFeopXL2d/WjGCUBJVvLsuF118eS0qPQd3uGobyXO0O+CwkSdGgiy0FST5ah
N/cqC6PE2FbpuFuvS9/O41y3NUdqpH2vXohBKMoEjw3XcAnL2qooAu5gWpWCQsfX
SAV1EfT77kryd7FszUw10B6aFtKkfyFwqxN2Ec3DLxUScNAfwsm/TEv1zERvD0ly
sJaJDcAYYuW7nwKN7zINAX34jMvT4K1Ipjsi/swukchMlP8drXsWSRanBk/UwMZh
ntqP+4MEMctCtG1AnZ17a7nKck/CnAVR4iQRxsLS2jYrU5mPrFTKTkzrK/MhN4TC
yGB0ewxfd2VxB45YMivt
=d+D4
-----END PGP SIGNATURE-----

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