tomcat6

Why does tomcat replace context.xml on redeploy?

亡梦爱人 提交于 2019-11-28 20:35:26
Documentation says if you have a context file here: $CATALINA_HOME/conf/Catalina/localhost/myapp.xml it will NOT be replaced by a context file here: mywebapp.war/META-INF/context.xml It is written here: http://tomcat.apache.org/tomcat-6.0-doc/config/context.html Only if a context file does not exist for the application in the $CATALINA_BASE/conf/[enginename]/[hostname]/, in an individual file at /META-INF/context.xml inside the application files. But everytime I re-deploy the war it replaces this myapp.xml with the /META-INF/context.xml! Why does it do it and how can I avoid it? Thanx petro

java.lang.ClassNotFoundException: org.apache.tomcat.jdbc.pool DataSourceFactory

半世苍凉 提交于 2019-11-28 19:40:39
I'm investigating moving away from an Oracle connection pool and using the Tomcat connection pool. I followed the myriad of example for configuring the <Resource> in Tomcat's /conf/server.xml . I found great info here . However, when I start Tomcat, I get the following error: javax.naming.NamingException: Could not load resource factory class [Root exception is java.lang.ClassNotFoundException: org.apache.tomcat.jdbc.pool DataSourceFactory] I'm using Tomcat 6.0. My <Resource> config in /conf/server.xml is: <Resource name="jdbc/myds" type="javax.sql.DataSource" auth="Container" factory="org

CATALINA_HOME environmental variable is not defined correctly

那年仲夏 提交于 2019-11-28 17:30:51
I installed Apache Tomcat 6.0 to a C:/Program Files folder and I set the environmental variables JAVA_HOME and CATALINA_HOME , but when I start the server using startup.bat , I am getting the error: CATALINA_HOME environmental variable is not defined correctly. My CATALINA_HOME environment variable is set to CATALINA_HOME=C:\Program Files\apache-tomcat-6.0.35 . What did I do wrong? Rohith At first you have to mention tomcat up to tomcat's version refer below CATALINA_HOME: C:\Program Files\apache-tomcat-6.0.35; then set CLASSPATH variable to CLASSPATH : C:\Program Files\apache-tomcat-6.0.35

How do you map a sub domain to a webapp on Tomcat 6 (including the root webapp)?

我们两清 提交于 2019-11-28 16:02:10
问题 subject says it all. What I want is to map each sub domain to a webapp like: http://root.domain.com:8080 -> http://domain.com:8080/ http://manager.domain.com:8080 -> http://domain.com:8080/manager http://abc.domain.com:8080 -> http://domain.com:8080/abc http://def.domain.com:8080 -> http://domain.com:8080/def on a localhost machine this would be http://root.localhost:8080 -> http://localhost:8080/ http://manager.localhost:8080 -> http://localhost:8080/manager http://abc.localhost:8080 -> http

Tomcat 6 server creation using eclipse IDE on ubuntu

本秂侑毒 提交于 2019-11-28 13:52:47
问题 I'm having a problem running tomcat 6 with eclipse 3 in ubuntu. I installed tomcat 6 on my machine and when I tested it using http://localhost:8080 , it worked fine. But whenever i want to create a server in eclipse, i select Tomcat 6 , i get the following message "Cannot create a server using the selected type" , and i can't click next. Any idea why? 回答1: There’s a better workaround so you can keep Ubuntu’s Tomcat6 (taken from http://ubuntuforums.org/showthread.php?p=8541057, by DisDis) In a

Is it possible to supply Tomcat6's context.xml file via the Maven Cargo plugin?

不想你离开。 提交于 2019-11-28 10:13:54
I'd like to keep Tomcat's context.xml file out of my WAR file's META-INF directory if possible. Can this be done with Maven's cargo plugin? I can't seem to find the correct configuration. Eureka! After many days of studying this problem I finally found a very effective solution. The key is to take your Tomcat XML context fragment file and use the <configfiles> element of cargo to drop it in the conf/Catalina/localhost directory with the name context.xml.default . The only downside is that this will make your context definitions available to all web-apps, but this shouldn't really matter only

Tomcat 6, JMX and the dynamic port problem

一世执手 提交于 2019-11-28 09:14:09
after reading and trying a lot around, I have to ask if anyone has a solution for my problem. I am trying to set up some Tomcats (V6) behind a firewall. This is no big deal - but I want to monitor them via JMX. I read the TC docu and came across the JMXRemoteLifecycleListener . My test TC installation is set up exactly as stated in the above link. Thus I don't get a connection from one host in our network to another. Additionally a third, random port is open every time I start TC. In my server.xml the listener is activated <Listener className="org.apache.catalina.mbeans

Scheduled task in a web application? [duplicate]

你离开我真会死。 提交于 2019-11-28 08:26:26
This question already has an answer here: What is recommended way for spawning threads from a servlet in Tomcat [duplicate] 6 answers I'm building a statistics apps for an online game, built using the servlet API in Java (to be deployed on Tomcat). It's easy enough to let the game send a message to the stats server every time a user logs in, because handling requests is what Servlets/Tomcat are for. I also need to periodically initiate requests on the stats server though, for example to retrieve the number of online users from the game server or the number of fans from our Facebook page. It

Communication between two web application in same server

随声附和 提交于 2019-11-28 07:37:36
All, I have 2 web applications, Web1 and Web2, deployed on my tomcat server. I want classes in Web1 to call methods on classes in Web2. One way to do this is using webservice. Is there any other way similar to calling a method on class on same web application ?. Thanks. Yes. It is possible. It tried for same servlet container by using getServletContext().getContext() method. First you need to make changes in below file (Windows) C:\Program Files\Apache Software Foundation\Tomcat 7.0\conf\context.xml Set value of crossContext to true. context.xml <Context crossContext="true"> <!-- Default set

Tomcat 6 | What's the significance of antiResourceLocking & antiJARLocking?

岁酱吖の 提交于 2019-11-28 07:32:47
问题 I am working on a project where we'll be using Tomcat 6.0.20 for Development and production. I came across some issues related to hot deployment which requires one to set Context.antiResourceLocking to false in server.xml. I had some questions on antiResourceLocking and antiJARLocking. I have gone through the reference at http://tomcat.apache.org/tomcat-6.0-doc/config/context.html. What I can't understand is what exactly do you mean by a JAR getting locked or a resource getting locked. What I