tomcat6

How to set up the root servlet in Tomcat 6? [duplicate]

放肆的年华 提交于 2019-11-30 07:33:06
问题 This question already has answers here : How can I map a “root” Servlet so that other scripts are still runnable? (8 answers) Closed 2 years ago . Sorry for beginner's questions but I wonder how can I set the root servlet in Tomcat 6? For example I want to access my servlet on localhost:8080 , not on localhost:8080/myservlet Thanks! 回答1: deploy an web app with context root / and set servlet-mapping in web.xml as <servlet-mapping> .. <url-pattern>/</url-pattern> </servlet-mapping> 回答2: This is

starting tomcat on port 80 on CentOS release 5.5 (Final)

我是研究僧i 提交于 2019-11-30 06:47:19
I want to start Tomcat 6.0.29 on port 80. My OS is CentOS release 5.5 (Final) I changed following line in $TOMCAT_HOME/conf/server.xml <Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/> to <Connector connectionTimeout="20000" port="80" protocol="HTTP/1.1" redirectPort="8443"/> Then I run command: sudo /etc/init.d/tomcat6 start In file $TOMCAT_HOME/logs/catalina.log I found such exceptions: java.net.BindException: Permission denied <null>:80 at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:549) at org.apache.tomcat.util.net.JIoEndpoint

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

守給你的承諾、 提交于 2019-11-30 06:34:01
问题 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

Profile Tomcat Application With VisualVM

不想你离开。 提交于 2019-11-30 05:54:06
问题 I would like to profile an application that runs on Tomcat with the VisualVM tool. Unfortunately, when I tell VisualVM to profile Tomcat, Tomcat prints out a couple of messages indicating it is connecting to a profile tool and then simply exits. Details… I am using Windows XP, Tomcat 6, VisualVM 1.2.1, and JDK 1.6.0_11. In Visual VM, I right-click on the Tomcat Application and select “Profile” In the Profiler Tab, I press the Memory button (or the CPU button). Tomcat exits Note that if I

Where does Tomcat append / to directory paths?

ε祈祈猫儿з 提交于 2019-11-30 05:36:40
问题 Suppose my Tomcat webapps directory looks like this: webapps/ webapps/fooapp/ webapps/fooapp/WEB-INF/ webapps/fooapp/WEB-INF/web.xml webapps/fooapp/bardir/ When I make a GET request for /fooapp/bardir , Tomcat sees that webapps/fooapp/bardir is a directory and sends back a 302 to /fooapp/bardir/ (with a slash at the end). Here is my question: Where in the Tomcat source code does this take place? (I'm looking at 6.0.x but a correct answer for any version would be a great starting point.) The

Tomcat 6 memory leaks log entries

ぐ巨炮叔叔 提交于 2019-11-30 05:19:48
Below is outtake of unique entries in my Catalina.out file on CentOS machine. I'm running Tomcat 6 with spring 3 and my application. There is whole bunch of them so I just picked some that keep repeating. This doesn't happen all the time but it happens at least once a week. The Question is what can I do to prevent the bellow from happening? Feb 3, 2011 2:37:48 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc SEVERE: The web application [] registered the JBDC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory

how to use org.springframework.web.filter.CharacterEncodingFilter to correct character encoding?

回眸只為那壹抹淺笑 提交于 2019-11-30 05:06:54
I need some help. I placed the code snippet below in my web.xml . <filter> <filter-name>encodingFilter</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter </filter-class> <init-param> <param-name>encoding</param-name> <param-value>UTF-8</param-value> </init-param> </filter> <filter-mapping> <filter-name>encodingFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> and in my server.xml : <Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443" URIEncoding="UTF-8"/> My jsp pages are encoded as UTF-8 and my mysql table

How to pass the -D additional parameter while starting tomcat?

☆樱花仙子☆ 提交于 2019-11-30 03:09:08
I have a maven project, after running command mvn install all project as well as module compile and copied to local repository successfully. But now I want to run the generated web application in tomcat6. Client provided some parameter for tomcat like -Dapp.username,-Dapp.username, which will be used internally once project will start.ButI do not know how to set these additional parameter in tomcat6. Below is my development environment OS = Windows Tomcat = tomcat 6.0.27 Please help me? You can set an environment variable to do that. E.g. in Linux: export JAVA_OPTS="-Dapp.username -Dapp

javax.naming.NameNotFoundException: Name jdbc is not bound in this Context

女生的网名这么多〃 提交于 2019-11-30 02:40:20
问题 Am working on web Services... and am a beginner, Am trying to get Oracle Db connection in a service File and am getting below error: javax.naming.NameNotFoundException: Name jdbc is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:770) at org.apache.naming.NamingContext.lookup(NamingContext.java:153) at DatabaseConnection.shamDBConn.getShamStage(shamDBConn.java:25) at lineItemPrice.itemDetails.getUserId(itemDetails.java:17) at ServerSevices

Tomcat works but I can't reach http://localhost:8080/

蓝咒 提交于 2019-11-30 02:09:20
When I run Tomcat from the windows tray, it starts and I can't reach http://localhost:8080/ Tomcat homepage, but if I run it from Eclipse, it works, my applications works, but I can't reach the http://localhost:8080/ ... How to solve it? Or is it normal? Thanks! VonC This maybe normal, according to this thread : This is normal. To see why, double-click on the Tomcat server in the Servers view. This will open the Tomcat configuration editor. Click on the "Open launch configuration" link in the Overview section. This will open the launch configuration properties dialog. Select the Arguments tab