| Author |
Server root directory
|
Bitan Biswas
Greenhorn
Joined: Aug 05, 2011
Posts: 7
|
|
Need Some Guide here,
I have a java enable domain (suppose www.example.com) and I have uploaded a .war file in this domain ( suppose example.war), So the web application is executing in www.example.com/example link. Now my question is, is it possible to execute the web application in only www.example.com link?
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56153
|
|
|
That has to do with how you configure the server, not with how you write your code. What servers are you using? Tomcat? Tomcat with Apache? Other?
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Bitan Biswas
Greenhorn
Joined: Aug 05, 2011
Posts: 7
|
|
Yes, I am using tomcat 7.
in localhost the project is running under http://localhost:8084/example link for example.war.
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14456
|
|
In Tomcat, you can do this by replacing the default webapp in the root context with your own webapp. However, unless you also change Tomcat's port assignments, you'd still have to have the ":8084" in your URLs. And if you reassign Tomcat to port 80, most OS's will demand that Tomcat be started as a privileged user, which means that the system will be less secure.
A popular alternative is to front Tomcat with a proxy server such as Apache httpd. The proxy server can listen on port 80/443 safely (usually) as well as translating from a virtual host root to a Tomcat non-root context.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
 |
|
|
subject: Server root directory
|
|
|