context.xml

Creating a custom tomcat session manager without putting the jar in the CATALINA_HOME directory?

亡梦爱人 提交于 2019-11-28 08:57:19
问题 I am working on a custom session manager for Tomcat and I got it working with one caveat, I have to put the jar(and all the associated jars) in the CATALINA_HOME/lib directory or I get a noclassdef found exception, even though the classes are in the WEB-INF/lib directory. Is there any way to force tomcat to look in the web apps lib directory when it is loading a session manager? Putting it in the lib directory is error-prone(as you have to remember to copy the jar over when upgrading and/or

Tomcat context.xml files, is there a hierarchy?

穿精又带淫゛_ 提交于 2019-11-27 21:26:21
问题 I am trying to use symbolic links in one of the applications I have running on Tomcat5. Thanks to some help from another StackOverflow question I was able to do it by creating a context.xml file in /...myapplication/META-INF/context.xml I am now trying to implement this on a production server. However, there are other applications running on it. And there is another context file /...tomcat/conf/context.xml It seems to me these are setting configurations server-wide to all applications. If I

Which Tomcat 5 context file takes precedence?

安稳与你 提交于 2019-11-27 10:10:50
问题 Tomcat documentation says: The locations for Context Descriptors are; $CATALINA_HOME/conf/[enginename]/[hostname]/context.xml $CATALINA_HOME/webapps/[webappname]/META-INF/context.xml On my server, I have at least 3 files floating around: 1 ...tomcat/conf/context.xml 2 ...tomcat/Catalina/localhost/myapp.xml 3 ...tomcat/webapps/myapp/META-INF/context.xml What is the order of precedence? 回答1: For the files you listed, the simple answer assuming you are using all the defaults, the order is (note

How can I specify system properties in Tomcat configuration on startup?

吃可爱长大的小学妹 提交于 2019-11-26 17:23:20
I understand that I can specify system properties to Tomcat by passing arguments with the -D parameter, for example " -Dmy.prop=value ". I am wondering if there is a cleaner way of doing this by specifying the property values in the context.xml file or some other tomcat configuration file. I would like to do this because, first, it is easier to keep track of my properties, and second, I have multiple contexts running and I don't know how I would specify context-specific properties through the -D parameter. I am using Tomcat version 5.5. (Update: If I could delete this answer I would, although

How can I specify system properties in Tomcat configuration on startup?

谁说我不能喝 提交于 2019-11-26 05:27:02
问题 I understand that I can specify system properties to Tomcat by passing arguments with the -D parameter, for example \" -Dmy.prop=value \". I am wondering if there is a cleaner way of doing this by specifying the property values in the context.xml file or some other tomcat configuration file. I would like to do this because, first, it is easier to keep track of my properties, and second, I have multiple contexts running and I don\'t know how I would specify context-specific properties through

How to set the context path of a web application in Tomcat 7.0

牧云@^-^@ 提交于 2019-11-25 22:57:48
问题 I know that I can rename my webapp (or it\'s WAR file) to ROOT but this is a terrible way to do it, IMHO. Now I checked out the tomcat doc & it says It is NOT recommended to place elements directly in the server.xml file So I tried doing it another method that it suggested. Individual Context elements may be explicitly defined: In an individual file at /META-INF/context.xml inside the application files. So I created a /META-INF/context.xml with the following code, <?xml version=\"1.0\"