• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

web application url

 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.





 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ulf
 
Ranch Hand
Posts: 689
Scala Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Scala Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 164
Android Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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>


 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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..
reply
    Bookmark Topic Watch Topic
  • New Topic