tomcat6

How to create alias to the host

I need to create a alias for host in tomcat, lot of alias need to create. We have more than 500 users are using the web application. Each user should have saparate url but all r going to use same application. I thought i can use alias but how to create alias like'.xyz.com'. In the place of '' client name has to come. Any body can sugges...

How to determine the best number of threads in Tomcat?

How does one determine the best number of maxSpare, minSpire and maxThreads, acceptCount etc in Tomcat? Are the existing best practices? I do understand this needs to be based on hardware (e.g. per core) and can only be a basis for further performance testing and optimization on specific hardware. ...

Tomcat cluster fails and generates tons of logs

Periodically, I'm getting problems with my Tomcat 6 cluster (2 nodes). One of the nodes would just go haywire and generate a ton of logs repeating the following: Aug 25, 2009 11:44:10 AM org.apache.catalina.ha.session.DeltaRequest reset SEVERE: Unable to remove element java.util.NoSuchElementException at java.util.LinkedList.rem...

Tomcat: Caching SWF files with varying query strings

I'm current loading my SWF from a JSP, and passing parameters to it via query string (e.g. flash.swf?key=1234abcd) which works fine. The problem is that this appears to disable caching completely. My users will likely visit my Flash app with a different query string every time, which will lead to long load times. I see in the headers th...

Implementing Admin Module on Tomcat 6

Hello All, We recently upgraded to Tomcat 6 and I have discovered the admin module does not come with the installation. Has anyone attempted to integrate the admin download from tomcat 5.5 into tomcat 6 and could tell me the steps they took. This is installation serves users exclusively behind our filewall. Thanks ...

Starting up tomcat-6.0.20 from eclipse-3.5.0 (galileo) leads to the 404 error

Hi. Console dogs me. Can anybody help? The sad story starts like this. My OS is ubuntu-9.04. I installed tomcat-6.0.20 by extracting it from .tar.gz package and put it under the /usr/share/tomcat-6.020 directory. Then I started tomcat from console, and everything seemed to be fine. localhost answered with the $CATALINA_HOME/webapps/ROO...

Tomcat-6.0.20 and user authentication

The problem A tomcat manager page can not be accessed by a user granted a manager role. The things I tryed to do I added a user with a manager role into tomcat-users.xml: <role rolename="manager"/> <user username="emanemos" password="password" roles="manager"/> I also looked up the $CATALINA_HOME/webapps/manager/WEB-INF/web.xml to ...

Setting CATALINA_OPTS for tomcat6 on windows doesn't work.

Hi, I'm trying to setup Tomcat6 to work with JMX on Windows Vista 64. To do that I need to pass the parameters below to Tomcat6. What I do in command prompt. (that doesn't work) set CATALINA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9898 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxr...

Deploying a war to tomcat server with maven 1.1

Hi, does anyone know a way to configure a maven goal to deploy to a tomcat server after a build is run? I know that this is possible using the maven-tomcat-plugin but it looks as though as this only works for Maven 2 whereas I'm using Maven 1.1 I'm currently trying to set up Hudson so this would be part of my continuous intergration ph...

Tomcat Hot Deploy not working

I'm having an issue hot deploying a new WAR on my Tomcat 6 server. When I add in my new WAR I can see that Tomcat is attempting to deploy it. However, I believe the problem lies in undeploying the old war - the exploded war folder's contents are all deleted - except the WEB-INF folder. If I stop the server, delete the WEB-INF folder an...

configure apache tomcat 6 with mysql

have changed web.xml and jsp to details for mysql and also put mysql drivers in classpath. yet unable to connect. mysql server of wamp running on port= 3306 and socket= /tmp/mysql.sock what necessary changes do i have to make in my application ...

How do I get Scala to run as a servlet under Tomcat?

I'm trying to build a basic servlet with scala, but I can't seem to figure out how to get it running under tomcat. I think my scala class is okay, and I included all the libs in scala-2.6.x-final-blah.tgz to my tomcat lib directory, but I still get the odd, generic error below. Can anyone tell me what's going on? javax.servlet.ServletE...

Scala and Tomcat -> NoClassDefFound Stringbuilder?

Hi, when I run my scala application under tomcat, I am unable to do basic string concatenation, and I get an error stating that no class definition was found for StringBuilder. I'm running under windows 7 (development) and ubuntu (production), and I don't believe that java 1.4.x JDK or JRE has ever been insalled on either system. Any id...

Single Log4j between Tomcat6 webapps

Hi, All! Is there a correct way to use Log4j logger with Common ClassLoader, not with Web-App based ClassLoader, i.e. use only one log4j.jar for all deployed web-apps? When i'm drop a log4j.jar in commons lib directory, log4j get a first loj4j.properties for any application and use only it. All other loj4j.properties (of other applicatio...

Tomcat 6 - The requested resource ... is not available.

I am trying to start developing with Java and the Stripes Framework. I have the following in my web.xml file <?xml version="1.0" encoding="ISO-8859-1"?> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.su...

Mysql/j Connector Unloads Mysteriously Under Tomcat 6/JDK 6

Hello - Thank you for taking time to look at my question. I developing a Java WAR file intended for distribution to only one server at a time. So far, I have tested on 3 different servers with success, one Debian, one Ubuntu and the other, the Windows machine I'm developing on. On the final deployment server, for some reason the app de...

JAX-WS and BASIC authentication, when user names and passwords are in a database.

Hi, I'm new to JAX-WS and there's a thing which I don't understand. There's a ton of tutorials available on how to set up JAX-WS security, but in pretty much all cases BindingProvider.USERNAME_PROPERTY and BindingProvider.PASSWORD_PROPERTY are stored in some .xml file(depending on the container I believe) - they are "hardcoded" that is....

FileUtils.readFileToByteArray throwing java.lang.OutOfMemoryError: Java heap space error

I am using Apache Commons IO FileUtils utility to read a file into a byte array. The file is 1.13 gigabytes in size. Each time this method is called, I get an out of memory error. I have this running on a Windows Server 2008 64 bit server with 8GB of memory. The first time I got this error, I opened up the Tomcat 6 Configuration utility ...

defining Tomcat servlet init parameters

Scenario: foo.war file contains a default value of init parameter fooParam=1. This is defined in foo.war!WEB_INF/web.xml which contains: <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"&gt; <web-app> ...

Configuring velocity within a tomcat web application. (Cookbook wanted)

Hi all, I have recently been introduced to the Velocity project. I have written a template and have run it as a simple Java application. Integration within my existing web project has not been that easy. Can anyone supply a cookbook for integrating Velocity and Tomcat? Thanks all! ...