File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How does Application Identify Context Path automatically

 
anand ashokan
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Say i have an EAR with application.xml which has context root defined as Myapp for the corresponding war.

When i access it through my local machine i use http://localhost:8080/Myapp

But In Production i am able to access the application www.xyz.com it automatically identifies the context path .

Is this a configuration done in Webserver to automatically redirect ?.
 
K. Tsang
Bartender
Pie
Posts: 3223
12
Android Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

The context path in your "localhost:8080/Myapp" is Myapp. In production, mostly the front end uses Apache web server and Tomcat or Java app server as JSP/Servlet container. There is a module called "jk_mod" that does the redirection based on some configuration in the Apache config file httpd.conf. So it's not automatic.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic