Re: Manager deploy uploaded war - doesn't use the /WEB-INF/context.xml
On 11/15/06, Tim Alberts [EMAIL PROTECTED] wrote: When I deploy my .war files with the Manager application it seems to completely ignore the /WEB-INF/context.xml file. What do I do? 1) put it in META-INF/context.xml where it belongs :-) and Context path=/servlet/path/to/myapp / 2) drop the path attribute -- it's irrelevant and ignored, since the path is derived from the name of the WAR file. HTH! -- Hassan Schroeder [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Manager deploy uploaded war - doesn't use the /WEB-INF/context.xml
Hassan Schroeder wrote: On 11/15/06, Tim Alberts [EMAIL PROTECTED] wrote: When I deploy my .war files with the Manager application it seems to completely ignore the /WEB-INF/context.xml file. What do I do? 1) put it in META-INF/context.xml where it belongs :-) and Sorry, I typed the email too quick. It is in META-INF/context.xml Context path=/servlet/path/to/myapp / 2) drop the path attribute -- it's irrelevant and ignored, since the path is derived from the name of the WAR file. HTH! If it is ignored, how can it be specified when uploading a war file via the manager? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Manager deploy uploaded war - doesn't use the /WEB-INF/context.xml
The path attribute is ignored in favor of the name of the war file. The context.xml is still consulted for JNDI resource definitions, etc., ... --David Tim Alberts wrote: Hassan Schroeder wrote: On 11/15/06, Tim Alberts [EMAIL PROTECTED] wrote: When I deploy my .war files with the Manager application it seems to completely ignore the /WEB-INF/context.xml file. What do I do? 1) put it in META-INF/context.xml where it belongs :-) and Sorry, I typed the email too quick. It is in META-INF/context.xml Context path=/servlet/path/to/myapp / 2) drop the path attribute -- it's irrelevant and ignored, since the path is derived from the name of the WAR file. HTH! If it is ignored, how can it be specified when uploading a war file via the manager? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- === David Smith Network Operations Supervisor Department of Entomology College of Agriculture Life Sciences Cornell University 2132 Comstock Hall Ithaca, NY 14853 Phone: 607.255.9571 Fax: 607.255.0939 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Manager deploy uploaded war - doesn't use the /WEB-INF/context.xml
On 11/15/06, Tim Alberts [EMAIL PROTECTED] wrote: path is derived from the name of the WAR file. If it is ignored, how can it be specified when uploading a war file via the manager? As originally stated -- it's the name of the WAR file. -- Hassan Schroeder [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Manager deploy uploaded war - doesn't use the /WEB-INF/context.xml
As originally stated -- it's the name of the WAR file. Please excuse my ignorance, but you can't make a filename: /path/to/my/webapp/app.war? How do I name the file to add the context or can it be done? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Manager deploy uploaded war - doesn't use the /WEB-INF/context.xml
As I remember you wanted an involved path -- ie path/to/my/webapp/my.jsp ... Use the path as the war's filename replacing all the / characters with # symbols. Should work Tim Alberts wrote: As originally stated -- it's the name of the WAR file. Please excuse my ignorance, but you can't make a filename: /path/to/my/webapp/app.war? How do I name the file to add the context or can it be done? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- === David Smith Network Operations Supervisor Department of Entomology College of Agriculture Life Sciences Cornell University 2132 Comstock Hall Ithaca, NY 14853 Phone: 607.255.9571 Fax: 607.255.0939 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Manager deploy uploaded war - doesn't use the /WEB-INF/context.xml
David Smith wrote: As I remember you wanted an involved path -- ie path/to/my/webapp/my.jsp ... Use the path as the war's filename replacing all the / characters with # symbols. Should work Well before we continue, thank you for the help... However it's not going well. I renamed the 'app.war' file as 'path#to#myapp#app.war' and the Manager application took it and said it was fine. However the link shows as 'http://host:8080/path#to#myapp#app' and does not work. When I go back to the manager though, it shows 2 applications loaded. The one I mentioned and something that looks correct 'http://host:8080/path/to/myapp/app'. Unfortunately, it says that it can't load this application: FAIL - Application at context path /path/to/myapp/app could not be started This seems to be on the right track, but not quite there. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Manager deploy uploaded war - doesn't use the /WEB-INF/context.xml
From: Tim Alberts [mailto:[EMAIL PROTECTED] Subject: Re: Manager deploy uploaded war - doesn't use the /WEB-INF/context.xml However it's not going well. I renamed the 'app.war' file as 'path#to#myapp#app.war' and the Manager application took it and said it was fine. The trick with the #-symbol in the path works when you put your Context element in an appropriately named .xml file in conf/[engine]/[host]. As a temporary workaround, you might want to try that. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Manager deploy uploaded war - doesn't use the /WEB-INF/context.xml
Hello I noticed this thread and have a follow up question. I know I can leave the path out of my META-INF/context.xml file, but I still have a docbase, and working dir values. In my original war file I have a context file with; Context crossContext=true docBase=mywebapp path=/mywebapp privileged=true workDir=work\Catalina\localhost\mywebapp Is there some way I can varibalize the end of those to match the war file name? I find myself using the same war file, but renaming it, and dropping it into webapps to create new instance. For instance, I rename the war file mywebapp1, mywebapp2, etc...creating context for all those that I can connect to. BUT I then need to hand edit the xml in conf/Catalina/localhost/ To have; Context crossContext=true docBase=mywebapp1 path=/mywebapp1 privileged=true workDir=work\Catalina\localhost\mywebapp1 So what I would like is have a context file that will put the proper entires into the context element, based on the war file name. Mike -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 15, 2006 3:20 PM To: Tomcat Users List Subject: RE: Manager deploy uploaded war - doesn't use the /WEB-INF/context.xml From: Tim Alberts [mailto:[EMAIL PROTECTED] Subject: Re: Manager deploy uploaded war - doesn't use the /WEB-INF/context.xml However it's not going well. I renamed the 'app.war' file as 'path#to#myapp#app.war' and the Manager application took it and said it was fine. The trick with the #-symbol in the path works when you put your Context element in an appropriately named .xml file in conf/[engine]/[host]. As a temporary workaround, you might want to try that. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Manager deploy uploaded war - doesn't use the /WEB-INF/context.xml
Caldarale, Charles R wrote: From: Tim Alberts [mailto:[EMAIL PROTECTED] Subject: Re: Manager deploy uploaded war - doesn't use the /WEB-INF/context.xml However it's not going well. I renamed the 'app.war' file as 'path#to#myapp#app.war' and the Manager application took it and said it was fine. The trick with the #-symbol in the path works when you put your Context element in an appropriately named .xml file in conf/[engine]/[host]. As a temporary workaround, you might want to try that. - Chuck The server seems to be doing this? I have a file in conf/ [engine] / [host] named with the # symbol 'path#to#myapp#app.xml and it contains the context element with the correct path 'path/to/myapp'. I also have the path#to#myapp#app.war in the webapps directory so it uploaded, but it is not unpacking the war into ANY location. It try to avoid posting server logs, but here it is...as you can see the name of the application is UnitsConverter.war and the desired context path is 'engineering/technical/servlet'. It seems the pertinent part is the first SEVERE exception java.net.MalformedURLException. 15-Nov-06 1:27:14 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive engineering#technical#servlet#UnitsConverter.war 15-Nov-06 1:27:14 PM org.apache.catalina.startup.ContextConfig init SEVERE: Exception fixing docBase: {0} java.net.MalformedURLException: no !/ in spec at java.net.URL.init(libgcj.so.7rh) at java.net.URL.init(libgcj.so.7rh) at org.apache.catalina.startup.ContextConfig.fixDocBase(catalina-5.5.17.jar.so9wef74.so) at org.apache.catalina.startup.ContextConfig.init(catalina-5.5.17.jar.so9wef74.so) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(catalina-5.5.17.jar.so9wef74.so) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(catalina-5.5.17.jar.so9wef74.so) at org.apache.catalina.core.StandardContext.init(catalina-5.5.17.jar.so9wef74.so) at org.apache.catalina.core.StandardContext.start(catalina-5.5.17.jar.so9wef74.so) at org.apache.catalina.core.ContainerBase.addChildInternal(catalina-5.5.17.jar.so9wef74.so) at org.apache.catalina.core.ContainerBase.addChild(catalina-5.5.17.jar.so9wef74.so) at org.apache.catalina.core.StandardHost.addChild(catalina-5.5.17.jar.so9wef74.so) at org.apache.catalina.startup.HostConfig.deployWAR(catalina-5.5.17.jar.so9wef74.so) at org.apache.catalina.startup.HostConfig.deployApps(catalina-5.5.17.jar.so9wef74.so) at org.apache.catalina.startup.HostConfig.check(catalina-5.5.17.jar.so9wef74.so) at java.lang.reflect.Method.invoke(libgcj.so.7rh) at org.apache.commons.modeler.BaseModelMBean.invoke(jakarta-commons-modeler-1.1.jar.so) at mx4j.server.interceptor.InvokerMBeanServerInterceptor.invoke(mx4j-3.0.1.jar.so) at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(mx4j-3.0.1.jar.so) at mx4j.server.interceptor.SecurityMBeanServerInterceptor.invoke(mx4j-3.0.1.jar.so) at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(mx4j-3.0.1.jar.so) at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(mx4j-3.0.1.jar.so) at mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.invoke(mx4j-3.0.1.jar.so) at mx4j.server.MX4JMBeanServer.invoke(mx4j-3.0.1.jar.so) at org.apache.catalina.manager.ManagerServlet.check(catalina-manager-5.5.17.jar.so) at org.apache.catalina.manager.HTMLManagerServlet.doPost(catalina-manager-5.5.17.jar.so) at javax.servlet.http.HttpServlet.service(tomcat5-servlet-2.4-api-5.5.17.jar.so) at javax.servlet.http.HttpServlet.service(tomcat5-servlet-2.4-api-5.5.17.jar.so) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(catalina-5.5.17.jar.so9wef74.so) at org.apache.catalina.core.ApplicationFilterChain.doFilter(catalina-5.5.17.jar.so9wef74.so) at org.apache.catalina.core.StandardWrapperValve.invoke(catalina-5.5.17.jar.so9wef74.so) at org.apache.catalina.core.StandardContextValve.invoke(catalina-5.5.17.jar.so9wef74.so) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(catalina-5.5.17.jar.so9wef74.so) at org.apache.catalina.core.StandardHostValve.invoke(catalina-5.5.17.jar.so9wef74.so) at org.apache.catalina.valves.ErrorReportValve.invoke(catalina-5.5.17.jar.so9wef74.so) at org.apache.catalina.core.StandardEngineValve.invoke(catalina-5.5.17.jar.so9wef74.so) at org.apache.catalina.connector.CoyoteAdapter.service(catalina-5.5.17.jar.so9wef74.so) at org.apache.coyote.http11.Http11Processor.process(tomcat-http-5.5.17.jar.so) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(tomcat-http-5.5.17.jar.so) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(tomcat-util-5.5.17.jar.so) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(tomcat-util-5.5.17.jar.so) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(tomcat-util-5.5.17
Re: Manager deploy uploaded war - doesn't use the /WEB-INF/context.xml
Caldarale, Charles R wrote: From: Tim Alberts [mailto:[EMAIL PROTECTED] Subject: Re: Manager deploy uploaded war - doesn't use the /WEB-INF/context.xml However it's not going well. I renamed the 'app.war' file as 'path#to#myapp#app.war' and the Manager application took it and said it was fine. The trick with the #-symbol in the path works when you put your Context element in an appropriately named .xml file in conf/[engine]/[host]. As a temporary workaround, you might want to try that. - Chuck The server is doing this? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Manager deploy uploaded war - doesn't use the /WEB-INF/context.xml
From: Michael Hencin [mailto:[EMAIL PROTECTED] Subject: RE: Manager deploy uploaded war - doesn't use the /WEB-INF/context.xml I know I can leave the path out of my META-INF/context.xml file, Not just can, but *must*. The same applies to the docBase attribute - it's only pertinent when your Context element is in some place other than META-INF/context.xml. The presence of inappropriate attributes may lead to inappropriate behavior. In my original war file I have a context file with; Context crossContext=true docBase=mywebapp path=/mywebapp privileged=true workDir=work\Catalina\localhost\mywebapp Both the docBase and path attributes should be removed. Also, you don't really need workDir, since Tomcat will provide one for you the value of which you can retrieve from the ServletContext. Is there some way I can varibalize the end of those to match the war file name? Mostly just by removing them. So what I would like is have a context file that will put the proper entires into the context element, based on the war file name. If you just remove the unnecessary attributes from the Context element, I think you'll have achieved that goal. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Manager deploy uploaded war - doesn't use the /WEB-INF/context.xml
Testing. Seem to have some email problems...please disregard. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Manager deploy uploaded war - doesn't use the /WEB-INF/context.xml
From: Tim Alberts [mailto:[EMAIL PROTECTED] Subject: Re: Manager deploy uploaded war - doesn't use the /WEB-INF/context.xml The server seems to be doing this? I have a file in conf/ [engine] / [host] named with the # symbol 'path#to#myapp#app.xml and it contains the context element with the correct path 'path/to/myapp'. There should be no path attribute in a Context element unless the element is within server.xml. The one you're referring to in conf/[engine]/[host] is just a copy of what's in META-INF/context.xml, renamed to the path of the app during deployment. I haven't yet chased down exactly when Tomcat copies the context.xml from META-INF into conf/[engine]/[host]/[appname].xml. I also have the path#to#myapp#app.war in the webapps directory so it uploaded, but it is not unpacking the war into ANY location. This has nothing to do with unpacking WARs. For the moment, you may have to keep your app outside of Tomcat's webapps directory, and explicitly place your Context element - with docBase - into conf/[engine]/[host]/path#to#myapp.xml (not path#to#mayapp#app.xml). Tomcat 5.5.20 does not seem to like .war names with #-symbols in them. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Manager deploy uploaded war - doesn't use the /WEB-INF/context.xml
I should add, I am using TC 5.0.28. When I remove all those entries, my context file now says; Context crossContext=true privileged=true But, when I deploy it with tomcat manager, I get this error. FAIL - Encountered exception java.io.IOException: java.lang.IllegalArgumentException: Context path is required -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 15, 2006 4:09 PM To: Tomcat Users List Subject: RE: Manager deploy uploaded war - doesn't use the /WEB-INF/context.xml From: Michael Hencin [mailto:[EMAIL PROTECTED] Subject: RE: Manager deploy uploaded war - doesn't use the /WEB-INF/context.xml I know I can leave the path out of my META-INF/context.xml file, Not just can, but *must*. The same applies to the docBase attribute - it's only pertinent when your Context element is in some place other than META-INF/context.xml. The presence of inappropriate attributes may lead to inappropriate behavior. In my original war file I have a context file with; Context crossContext=true docBase=mywebapp path=/mywebapp privileged=true workDir=work\Catalina\localhost\mywebapp Both the docBase and path attributes should be removed. Also, you don't really need workDir, since Tomcat will provide one for you the value of which you can retrieve from the ServletContext. Is there some way I can varibalize the end of those to match the war file name? Mostly just by removing them. So what I would like is have a context file that will put the proper entires into the context element, based on the war file name. If you just remove the unnecessary attributes from the Context element, I think you'll have achieved that goal. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Manager deploy uploaded war - doesn't use the /WEB-INF/context.xml
From: Michael Hencin [mailto:[EMAIL PROTECTED] Subject: RE: Manager deploy uploaded war - doesn't use the /WEB-INF/context.xml I should add, I am using TC 5.0.28. Ahh - that does make a difference. Most of the information you were give applies to 5.5; the rules have changed significantly since 5.0. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Manager deploy uploaded war - doesn't use the /WEB-INF/context.xml
I see, it's about time for me to get it updated to TC 5.5! Thanks as always! Mike -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 15, 2006 5:24 PM To: Tomcat Users List Subject: RE: Manager deploy uploaded war - doesn't use the /WEB-INF/context.xml From: Michael Hencin [mailto:[EMAIL PROTECTED] Subject: RE: Manager deploy uploaded war - doesn't use the /WEB-INF/context.xml I should add, I am using TC 5.0.28. Ahh - that does make a difference. Most of the information you were give applies to 5.5; the rules have changed significantly since 5.0. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]