• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

web application url

 
siraj baig
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure, but you can do the modifications in server.xml under conf directory. Please check it once, you can change appBase.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ulf
 
Nishan Patel
Ranch Hand
Posts: 689
Eclipse IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.

 
siraj baig
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 689
Eclipse IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi,

What i think that your application with ROOT name not deployed proper in Tomcat.

So try to deploy it proper.

 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
If i want my app with the same name "SampleWebApp" Instead of ROOT, How can i achieve this





siraj
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's the significance the web app name if it isn't part of the URL?
 
siraj baig
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 164
Android Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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>

 
karthick Soundararaj
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic