S
sugnaboris
Hope someone can help with a config problem I'm having. Many thanks in
advance for at least taking a look.
I'm building a WAR using Netbeans 5.5.1. The WAR takes its name from
the project root directory, so I end up with MyProjectRoot.war. I drop
this into the webapps folder under Tomcat 5.5, and it gets expanded
out into a directory of its own called MyProjectRoot. This has a META-
INF directory, containing a context.xml file, which has the following
contents:
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/MyURL"/>
in other words, I want to be able to access the webapp using:
http://<server>:8080/MyURL
However, I can only access the webapp at:
http://<server>:8080/MyProjectRoot
I've noticed that a new file has been generated in the directory:
Tomcat 5.5\conf\Catalina\localhost
This is called MyProjectRoot.xml, and has the following contents:
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/MyURL"/>
At the moment, I can work around by renaming the WAR prior to
deployment; but this should ideally be configurable.
Can anyone advise on how I can use the webapp configuration to force
the URL that I want? I thought the context.xml contents would do that:
it seems to work OK with the NetBeans bundled Tomcat during
development - although the webapp then lives outside the Tomcat
hierarchy.
Thanks again to all who read this far, and especially to anyone who
can advise on how to achieve this!
Ron
advance for at least taking a look.
I'm building a WAR using Netbeans 5.5.1. The WAR takes its name from
the project root directory, so I end up with MyProjectRoot.war. I drop
this into the webapps folder under Tomcat 5.5, and it gets expanded
out into a directory of its own called MyProjectRoot. This has a META-
INF directory, containing a context.xml file, which has the following
contents:
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/MyURL"/>
in other words, I want to be able to access the webapp using:
http://<server>:8080/MyURL
However, I can only access the webapp at:
http://<server>:8080/MyProjectRoot
I've noticed that a new file has been generated in the directory:
Tomcat 5.5\conf\Catalina\localhost
This is called MyProjectRoot.xml, and has the following contents:
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/MyURL"/>
At the moment, I can work around by renaming the WAR prior to
deployment; but this should ideally be configurable.
Can anyone advise on how I can use the webapp configuration to force
the URL that I want? I thought the context.xml contents would do that:
it seems to work OK with the NetBeans bundled Tomcat during
development - although the webapp then lives outside the Tomcat
hierarchy.
Thanks again to all who read this far, and especially to anyone who
can advise on how to achieve this!
Ron