tomcat

How do you set JAVA_OPTS for a service based version of tomcat using plesk on linux?

I have installed a servlet (solr) that requires that I set the variable solr.solr.home equal to solr home. Something like: JAVA_OPTS=-D=solr.solr.home='/usr/share/tomcat/solr' The version of tomcat I am using is running as a service setup through plesk control panel. After googling this I found a page that said I should edit the web.x...

Web User Interface for a Java application

Hello, I'm trying to create a web user interface for a Java application. The user interface is going to be very simple, consisting of a single page with a form for users to pose their queries, and a results page -- sort of like Google's search engine or Ask.com. I'm quite familiar with the base API of Java, but I don't have much experi...

Hudson continuous integration server: how to see Windows mapped directories that are visible to Ant?

Using Hudson, Ant 1.7, Tomcat 6.20, JDK 1.6 and JDK 1.5; all on Windows boxes. My Ant build script for a WAR file uses JARs stored on a remote server. The directory path to the remote server is mapped as a network drive in Windows. A build.properties file is used to specify the paths to the JAR dependencies. When building with Ant, e...

Selectively running a war in Tomcat Web apps.

Hi all, Here is my problem statement- I have an application in webapps of tomcat. I want to run the application in the browser only after checking the licence of the software. Is it possible to stop the application from running, whereas allowing other wars to run in the browser. Thanks, Adi ...

How should I monitor a web application on tomcat using JMX?

Hi, I would like to monitor web applications running under tomcat using JMX. I don't want to just use the built in JMX implementation of Tomcat, I want to implement an mbean for the actual Web Application so I can get information on application-specific settings and monitor it. The problem with web applications and online monitoring i...

How to make Tomcat 6.0 log the console?

How can I configure Tomcat 6.0 (running under Centos 5.3) to log what comes out of my web app's console (System.out/err)? Is it possible to specify a path and file size limit as well? Thanks for your help! ...

mod_jk conflicts with mod_rewrite

Hello I've got an Apache and Tomcat running and I use mod_jk to bind them. I have a Tomcat worker called "tc1" and the following setup on my VirtualHost: JkMount /* tc1 JkUnMount /*.png tc1 JkUnMount /*.gif tc1 JkUnMount /*.css tc1 JkUnMount /*.js tc1 That way Tomcat serves all requests apart the ones for static files. Now I want ...

What is a good setting for noCompressionUserAgents in Tomcat?

Googling for "noCompressionUserAgents" ends up with the same boilerplate config that seems to have been copied around and yet is not very useful (and even is here on stackoverflow:) stackoverflow.com/questions/550024/tomcat-compression-does-not-add-a-content-encoding-gzip-in-the-header noCompressionUserAgents="gozilla, traviat...

Query about Apache (httpd) dumpio log entry for the Request body which is coming NULL on Tomcat side

Hi, I am working on a hosted application running on Apache Tomcat 6.0.18 and it is hidden behind Apache (httpd). They are connected through mod_jk. We have take VPS and therefore Apache has been hosted as VirtualHost. The OS is CentOS 32 bit. The problem is that very randomly Tomcat is getting NULL request (it may have some URL specifi...

How to create ConfirmationURL using a JavaMail / Servlet Mechanism?

Am in the process of writing a server side Java program which would send an e-mail to a user with a confirmation URL (located in the body of the e-mail). Have already created the servlet (which can send an e-mail) using the JavaMail API... Am wondering how I would design / implement the actual unique URL (where upon an end user's click,...

How can i determine which servlet spec version a java WAR file uses?

I've got a WAR that i need to deploy with TomCat, but i'm not sure which version of the servlet spec the WAR file uses. According to apache's site (http://tomcat.apache.org/whichversion.html) i need to download a different version according to which spec the WAR file uses. Is there any way to tell by unzipping the WAR file and looking ...

Adding a directory to tomcat classpath

I have a folder in my C: drive as C:\app_config\java_app This folder contains some locale specific property files. I have a java class (PrjPropertilesLocator) that loads the property files based on default locale on the startup of the web App.My web application is running inside tomcat. The problem is how should i set this directory C:\...

Tomcat application/catalina logs buffered on Vista, can't be tailed

I'm working on a Vista workstation purely out of stubbornness. Not that I like it, but it's what IT put on the machine when I arrived, and I'm determined to make it work somehow. I build a webapp and deploy it under Tomcat 5.5, starting it from the command line, not as a service. The problem is that the log files written by Tomcat and...

Access environment variable from java servlet.

I would like to know if there is any way I can access an environment variable from a java servlet. I know that I can pass params to the servlet using web.xml but I need to pass some value at run-time. The requirement is something like this - A non-web based app running at the server side sets some value (environment variable) and it ...

Getting the actual jsp line number from a stack trace line number?

Here is the stacktrace: ... org.apache.jsp.showcustomer_jsp._jspService(showcustomer_jsp.java:128) org.apache.jasper.runtime.HttpJspBase.service(Unknown Source) This is what I do: Get the line number from the stacktrace, in this case 128. Find the showcustomer_jsp.java file (and it isn't exactly obvious to look in /var/run/tomcat-6/...

Apache Tomcat (6.x) SessionID placement

Hey guys, I need to know which class in Tomcat (6.x) is responsible for placing the SessionID either into a cookie or appending it to the request. Is this done after all Filters are passed? I need to modify the SessionID before the response is sent to the browser... ...

Axis2 (war) + Tomcat 6: WSDL2Java missing?

Hello guys, I am trying to learn how to implement Web Services using Axis2 and Tomcat, but i'm afraid that i'm not grasping some of the basics. I was following this tutorial but when i attempted to use WSDL2Java i noticed that i do not have the tool anywhere. This happens due to the fact that i downloaded and installed the .war (web ar...

How to manage a JMX web application.

I've gone through the process on this page to expose the JMX interface of a web application. I've managed to view the exposed interface on the Tomcat JMX proxy but when I load JConsole and look for the exposed mbean interface I can't find anything related to the attributes and operations exposed. Thre is no specific entry on jconsole ...

spring security, tomcat, getRemoteUser method

hi! i've got two applications in same tomcat. one of those applications uses spring security for authentication. i would like method getRemoteUser to return valid user name in second application when logged into first one. is there easy way to achieve this? can u please point me out to simplest possible solution which will do that? th...

What is a good tutorial on how to set up tomcat with mysql and database pooling?

I have been looking for some good instructions on how to utilize connection pooling in Tomcat 6 connecting to Mysql 5, but there does not seem to be any complete references. I am having trouble piecing together different tutorials to get a clear picture. I must admit, I am very much a beginner in dealing with Tomcat and it's configurat...