tomcat

Control the classpath ordering of jars in WEB-INF/lib on Tomcat 5?

I have a legacy web app running in Tomcat 5.0. This web app has two jars in WEB-INF/lib, let's say Foo-2.0.jar and Bar-2.0.jar. Bar-2.0.jar actually includes a Foo-1.0.jar inside of it. Bar is also a dead project, meaning no upgrading, no source, but still important to the application. The latest release of this application requires Fo...

tomcat or glassfish as comet server?

they are both free but i think glassfish has some limitation or when you reach up to a certain nr of users (comet) then you have to pay? is that correct? if true, could you use tomcat as a comet server? if not, then which free comet servers are there supporting long polling and iframe? ...

Monitoring a Java web application - is JMX the right choice?

Hi, We have a Java web application and we'd like to set up some basic monitoring with a view to expanding this monitoring in future. Our plan is as follows: (1) Collect generic information (e.g. memory and threads) about the virtual machine of the web container that application is running in. (2) Monitor the "state" of the applicatio...

Eclipse interaction with Tomcat - cannot undeploy applications

My problem is that if I use Eclipse to deploy my Web Application (via Run As->Run Server), I cannot undeploy it, as within Tomcat Manager the undeploy link against the Application is not highlighted. If I manually put in the URL I get the following Error: FAIL - Context /TomcatBasic is defined in server.xml and may not be undeployed Im...

Deploy war on Tomcat without the war name in the URL

I build a war file called myapp.war and deploy it on Tomcat. I've changed the port from 8080 to 80 so I can then get to it at example.com/myapp (where example.com is my host). How can I get configure the application so when I go to example.com, it shows my app? I don't want to just redirect from example.com to example.com/myapp - I do...

tomcat webapp silently fail

It's driving me insane! I have a tomcat webapp that uses Hibernation Configuration, the code below silently fails at Configuration cfg = new Configuration(); tomcat logs are not giving any error except my debugging statement right below where it fails (BEGIN STATIC!!!). No exception is thrown.. However when I packed the app into a ja...

hibernate - uniqueResult silently fails

I have a login controller that use the hibernate uniqueResult method. Everything works fine when i test it in eclipse's tomcat server. But when i deploy my webapps to tomcat server (on the same machine) it fails: it always returns null even i use the correct credential. Here is my hibernate code: session.createCriteria(User.class) ...

add tomcat server in netbeans question

i'm using netbeans and when i create a new web application project i click the "Add" to add a server cause in a tutorial they are using tomcat and not glassfish. I then choose Tomcat 6.0 from the list and the next page is displayed where i have to input Server Location Username Password I dont get this part. What location do they me...

How to delete a txt file when using Tomcat and servlets?

Hi, I'm working in an application using Tomcat and servlets. There is a servlet (audioProcess) that receives the name of an mp3 file, that is played. This servlet also processes the mp3 file and stores the result in a txt file. The content of this txt will be replaced when the audioProcess servlet is invoked again (with a different mp...

Is it possible to run a cron job in a web application?

In a java web application (servlets/spring mvc), using tomcat, is it possible to run a cron job type service? e.g. every 15 minutes, purge the log database. Can you do this in a way that is container independent, or it has to be run using tomcat or some other container? Please specify if the method is guaranteed to run at a specific t...

tomcat webservice publishing

hello, if i know that a tomcat is publishing a webservice but i don't know its url. How can i discover what webservice this tomcat is publishing? thanks ...

j2ee application in tomcat

Hi, I've developed a j2ee application, now say sample.war is the file. When we port this to tomat webapps, it explodes to sample folder. But if we want to run this application for two people, how do we do that? some thing like http://address.com/user1/ and http://address.com/user2/ and in this we have different CSS (only the look varies...

Do we really need to restart IIS 7 application pool? Do the same practice apply to other web servers?

I am just wondering why is restarting IIS 7 application pool consider a good practice? I know that it'll clean up orphan resources like threads or session state, but how does other web server deal with this kind of problem? Do java developer/admin have to restart weblogic/websphere/apache/tomcat every so often to clean up junk in memor...

How can i get error page from a servlet?

i am using tomcat, i defined some error-page in web.xml and mapped 404 error to page /error/error.jsp, but i need a servlet to detect if the resource exist, i want to set the Response status to 404 if the resource is not available, but tomcat would not redirect to the page i defined, so my question is: is there any api to get the page l...

How do I get Eclipse to get all of my resources on Tomcat's classpath?

I am having a devil of a time getting Eclipse to run my webapp on tomcat with the classpath correct. I have some spring configuration that references property files at classpath:/whatever.properties - these properties files live in my web project at src\main\resources, and I can see that they get deployed to the WEB-INF\classes folder, ...

Open source deployment tool

What is the best configuration management tool to deploy war application on tomcat(Windows)? Puppet? ...

Tomcat HTTPS keystore certificate

Ran into another problem using SSL and Tomcat: I've configured a keystore which contains a key and a certificate (the server certificate I wish to present to the clients connecting to the site). I've done the same for the truststore (I'm going to need client authentication). The problem I have now is that when I connect to my Tomcat ins...

Setting up tomcat with eclipse on first jsp program

I am just following along the spring tutorial (http://static.springsource.org/docs/Spring-MVC-step-by-step/part1.html) I downloaded this version of Eclipse: http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/galileosr1 I guess tomcat is a separate install? Update Is Ant ready to go with eclipse, or that is yet an...

Should mod_proxy_ajp or mod_jk be used for a production environment?

I've been searching over the past few days of whether I should use mod_proxy_ajp or mod_jk to connect apache httpd and tomcat. All the sites I find are a few years old and outdated. So, which is best to use for a proper production environment? Is mod_proxy_ajp mature enough to entirely replace mod_jk, or is mod_jk still best if you can ...

Maximum URI length in Grizzly (GlassFish) and Tomcat

Is there a maximum length (not default value) for URIs in Tomcat and in Grizzly (GlassFish 3)? I want to create a RESTful API which should be able to receive big GET requests. ...