Author
web application url
siraj baig
Ranch Hand
Joined: Jul 11, 2006
Posts: 42
Hi,
I have developed a web application : "SampleWebApp"
To Access i will give : http://localhost:8080/SampleWebApp
But i want to access my application with out providing application name, as http://localhost:8080/
Please tell me, how can i configure in my web.xml
thanks,
siraj.
Ram Chhabra
Ranch Hand
Joined: Jan 07, 2008
Posts: 48
Not sure, but you can do the modifications in server.xml under conf directory. Please check it once, you can change appBase .
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35241
posted May 04, 2009 04:07:51
0
You'll need to move the application from the "SampleWebApp" directory to the root directory of the servlet container. If you're using Tomcat , it's the one called "ROOT".
Tomcat's "appBase" setting does something else.
Android apps – ImageJ plugins – Java web charts
Seetharaman Venkatasamy
Ranch Hand
Joined: Jan 28, 2008
Posts: 5575
Thanks Ulf
Nishan Patel
Ranch Hand
Joined: Sep 07, 2008
Posts: 676
Hi,
As tomcat always detect application with root name.
So, if your application deploy in tomcat with ROOT name you can access directly using http://localhost:8080/
So, deploy application with change name with ROOT.
Thanks, Nishan Patel
SCJP 1.5, SCWCD 1.5, OCPJWSD Java Developer ,My Blog
siraj baig
Ranch Hand
Joined: Jul 11, 2006
Posts: 42
Hi,
I have changed my app name to ROOT and accessed with http://localhost:8080/
But it's displaying me Tomcat Admin page.
siraj
Nishan Patel
Ranch Hand
Joined: Sep 07, 2008
Posts: 676
Hi,
What i think that your application with ROOT name not deployed proper in Tomcat.
So try to deploy it proper.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35241
posted May 04, 2009 04:56:56
0
siraj baig wrote: I have changed my app name to ROOT
This sounds wrong. The ROOT directory already exists; you need to move your application components into it, and change the web.xml file accordingly.
siraj baig
Ranch Hand
Joined: Jul 11, 2006
Posts: 42
Hi,
If i want my app with the same name "SampleWebApp" Instead of ROOT, How can i achieve this
siraj
Seetharaman Venkatasamy
Ranch Hand
Joined: Jan 28, 2008
Posts: 5575
siraj baig wrote:
If i want my app with the same name "SampleWebApp" Instead of ROOT
anyway you are not going to trigger using application name right?
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35241
posted May 04, 2009 06:18:47
0
What's the significance the web app name if it isn't part of the URL?
siraj baig
Ranch Hand
Joined: Jul 11, 2006
Posts: 42
Hi,
Yes, there is no significance of application name, but i would like to know can we do this way also
siraj
Vinoth Thirunavukarasu
Ranch Hand
Joined: Dec 18, 2008
Posts: 164
Its so simple
The only thing is we have to set context path in your Tomcat/conf/server.xml
<Context path=""
docBase="/SimpleWebApps"
reloadable="true" >
</Context>
Java Best Practices
Linux Best Practices
Amortization Calculator
karthick Soundararaj
Greenhorn
Joined: Mar 09, 2009
Posts: 26
Vinoth Thirunavukarasu wrote: Its so simple
The only thing is we have to set context path in your Tomcat/conf/server.xml
<Context path=""
docBase="/SimpleWebApps"
reloadable="true" >
</Context>
where exactly should this be added? i added it in server.xml but it doesnt work.. I get the default page instead..
A java addict
subject: web application url