tomcat5.5

How to clear ehcache without server restart

南楼画角 提交于 2019-12-07 04:47:13
问题 Though I guess its highly unlikely - but is there any way to clear the ehcache without restarting the server? I need to clear the cache for some testing - I cannot change the code and cannot afford to restart server at multiple times. PS: I am using apache-tomcat-5.5.25 Please let me know. Thanks, psvm 回答1: Do you expose Ehcache via JMX? Then you could clear the cache using JMX operations by using a tool like e.g. jvisualvm. Look for MBeans like net.sf.ehcache.CacheManager which provide a

Why is a Tomcat webapp failing when an almost identical app starts within the same Tomcat instance?

試著忘記壹切 提交于 2019-12-06 05:29:00
We're experiencing slightly strange webapp deployment behaviour under Tomcat 5.5.27 on Linux (both on CentOS in production and Ubuntu 10.04 for development). App A and app B are almost identical (exactly the same libraries, a copied Maven project), App B differs only in that its JPA entities are annotated to access a different table within the same schema (the JNDI database references are identical). When the apps are deployed into either environment, app B will not start. However: Manually starting the stalled app, from the Tomcat admin console, works fine (???). After any attempt to restart

Nightmare: Upgrading Tomcat 5.5 to 6.0

断了今生、忘了曾经 提交于 2019-12-06 02:03:50
I'm trying to upgrade a perfectly running embedded Tomcat 5.5 to Tomcat 6.0. I understand that all I need to do is replace Tomcat 5.5 jars with 6.0. That's what I did. So I replaced the following jars: catalina-5.0.28.jar catalina-5.5.9.jar catalina-optional-5.5.9.jar commons-el.jar commons-modeler-1.1.0.jar jasper-compiler-jdt.jar jasper-compiler.jar jasper-runtime.jar jmx-5.0.28.jar jsp-api-2.0.jar naming-factory.jar naming-resources.jar servlet-api-2.4.jar servlets-default.jar tomcat-coyote.jar tomcat-http.jar tomcat-util.jar with: annotations-api.jar catalina.jar jasper.jar tomcat-dbcp.jar

Sharing a single log4j jar file in Tomcat5 between multiple webapps with separate property files

痴心易碎 提交于 2019-12-06 00:25:13
Is it possible to use a single log4j jar file in an tomcat 5.5 setup, where it can be used by multiple webapps and have seperate logging for each webapp? I have about 8 different webapps written where the only real difference between the log4j property files is the log filename. However if I attempt to move log4j from the webapp WEB-INF/lib directory to the tomcat5 shared/lib directory I run into problems. All the property files basically look the same as the one below, where I just set file.name using System.setProperty("file.name", ) in the code. Not necessary really, but I was toying with

Using bonecp as Tomcat 5.5 datasource

时间秒杀一切 提交于 2019-12-05 17:01:32
I try to get Tomcat to use BoneCP as a connection pool because DBCP doesn't work correctly here. I tried to add it to the context.xml that defines my webapp like this: <Context path="/reports" privileged="true" crossContext="true"> <Resource name="jdbc/IKOffice" type="com.jolbox.bonecp.BoneCPDataSource" auth="Container" username="ik" password="******" jdbcUrl="jdbc:postgresql://localhost:5434/IKOffice_Core" lazyInit="true" partitionCount="1" ... more properties ... logStatementsEnabled="false" /> </Context> But when I try to access the resource, it always says: javax.naming.NamingException:

Cause of 'tmpFile.renameTo(classFile) failed' during JSP compilation

拥有回忆 提交于 2019-12-05 05:11:21
Recently, I started to experience strange behaviour in JBOss 4.0.5 JSP application. The JSP compilation fails on first (second, third,..) attempt with exception: 17:24:29,909 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception java.io.IOException: tmpFile.renameTo(classFile) failed at org.apache.jasper.compiler.SmapUtil$SDEInstaller.install(SmapUtil.java:245) at org.apache.jasper.compiler.SmapUtil.installSmap(SmapUtil.java:164) at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:429) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:297) at org

javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-05 01:31:32
I am getting issue while sending email. javax.mail.SendFailedException: Sending failed; nested exception is: javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25; nested exception is: java.net.ConnectException: Connection refused: connect at javax.mail.Transport.send0(Transport.java:219) at javax.mail.Transport.send(Transport.java:81) at org.apache.jsp.online_005fScheme_005fSend_005fMail_jsp.sendMail(online_005fScheme_005fSend_005fMail_jsp.java:116) at org.apache.jsp.online_005fScheme_005fSend_005fMail_jsp._jspService(online_005fScheme_005fSend_005fMail_jsp.java

Read HTTPServletRequest's POST body AND then call getParameter in Tomcat

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 12:24:16
I am in the situation where my application needs to inspect the content/data/body/payload of a POST request without changing the results of subsequent getParameter calls. Reading the body from the inputStream: The body can be read using the InputStream from request.getInputStream or BufferedReader from request.getReader . Reading POST parameters: POST requests typically include request parameters in the body of the request. These can be retrieved using getParameter . The Problem: the first getParameter call internally parses the inputStream and inserts all parameters into a parameter HashMap.

Find out the number of connections to tomcat server

五迷三道 提交于 2019-12-03 07:38:22
问题 I have a Java/Java EE web application deployed on Tomcat Server 5.5.17. I want to know the number of clients which are connected to the server. How can we find it out? 回答1: Most reliable way would be to search for ip.addr.of.srv:port in netstat . Here's the Windows based example (sorry, no Linux guru here ;) ) netstat -np tcp | find "12.34.56.78:80" Replace 12.34.56.78 by IP where Tomcat listens on and 80 by port where Tomcat listens on. This is actually not a programming problem, hence I

Eclipse - How can I change a 'Project Facet' from Tomcat 6 to Tomcat 5.5?

╄→гoц情女王★ 提交于 2019-12-03 04:04:03
问题 (Eclipse 3.4, Ganymede) I have an existing Dynamic Web Application project in Eclipse. When I created the project, I specified 'Default configuration for Apache Tomcat v6' under the 'Configuration' drop down. It's a month or 2 down the line, and I would now like to change the configuration to Tomcat 'v5.5'. (This will be the version of Tomcat on the production server.) I have tried the following steps (without success): I selected Targeted Runtimes under the Project Properties The Tomcat v5.5