Java Web Application Context

J

jstorta

I want users to be able to just go to my domain and reach my web
application without having to include the web app name in the URL.

GOOD: www.domain.com
BAD: www.domain.com/myapp

I am not opposed to having myapp in the URLs as they use the site, but
I don't want to force people to type it when they first come to the
site.

I know there are a few ways to do this.

I currently have Tomcat and Glassfish configured so that / is the
context for the app. This works fine, but it has always seemed like a
hack rather than an accepted process.

Is there a better, more accepted, way of accomplishing this?


Thanks.
 
D

Daniel Pitts

jstorta said:
I want users to be able to just go to my domain and reach my web
application without having to include the web app name in the URL.

GOOD: www.domain.com
BAD: www.domain.com/myapp

I am not opposed to having myapp in the URLs as they use the site, but
I don't want to force people to type it when they first come to the
site.

I know there are a few ways to do this.

I currently have Tomcat and Glassfish configured so that / is the
context for the app. This works fine, but it has always seemed like a
hack rather than an accepted process.

Is there a better, more accepted, way of accomplishing this?


Thanks.
Sounds like a good solution to me. The alternate is to have a web
server like Apache which uses proxy-pass and rewrite rules to direct the
request to the appropriate webapp container and webapp.

Alternatively, I think you can put a redirect in your root path index
handler, so that it redirects to the /myapp directory.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
SterlingLa
Top