tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marco de Booij <marco.develo...@debooy.eu>
Subject Application name
Date Sun, 05 Aug 2012 20:31:51 GMT
Hello,

I have tried to find the answer but I could not find a (to me) clear answer.

I build my applications with Maven and as a result my war file is like 
myapp-web-1.2.3.war. The static content is delivered by the Apache Web 
Server so I use this server to access the application deployed in Tomcat 
7.0.27:
/    JkMount /myapp-web-0.1.0-SNAPSHOT     worker1
     JkMount /myapp-web-0.1.0-SNAPSHOT/* worker1
     JkMount /myappworker1
     JkMount /myapp///* worker1/

I want to use the myapp since this will remain the same even if the 
version changes.  In the war file I have a context.xml file in the 
META-INF at 'root' level (not in the one in the classes directory) with 
the content:
/<?xml version="1.0" encoding="UTF-8"?>
<Context path="/myapp//" />/

The application works fine if I use 
http://localhost/myapp-web-0.1.0-SNAPSHOT but when I use 
http://localhost/myapp I only get the welcome page and when I try to get 
another page then I get an error message:
/javax.naming.NameNotFoundException: Name [app/AppName] is not bound in 
this Context. Unable to find [app]./

In the manager application of Tomcat I see both names in the application 
list.

I was able to use this in Glassfish. There I could define a application 
name in the console when I deployed the application. Is it also possible 
with Tomcat or do I need to rename the war file to myapp.war before I 
deploy the application?

Regards,

Marco

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message