tomcat

How to deploy the same webapp with different logging? (Tomcat, Solr)

We are using multiple solr instances on tomcat but want that they log into different log files. How could we do this? We are using the follwing xml file under tomcat/conf/Catalina/localhost to make it working: <Context docBase="/pathtosolr/dist/apache-solr-1.4.0.war" debug="0" crossContext="true" > <Environment name="solr/home" type...

Issue about Tomcat 5.5 "ROOT" directory.

Now I specify a directory name for "appBase" attribute on "{TomcatHome}/config/server.xml". <host appBase="d:/aaa"> <Context docBase="d:/aaa/bbb"> </Context> </host> When I navigate URL to "http://localhost:8080", TOMCAT think "d:/aaa/ROOT" as application directory. I want to know how can I modify this mechanism to make TOMCAT ...

wordpress servlet mapping not working

I have the latest Wordpress running on Tomcat 6.0.26 virtual host with Quercus PHP servlet. It works, except when I try to use perm links. A url such as /index.php/my-page-name doesn't seem to ever hit the PHP servlet . It gets a browser error that request resource is not available. It's like it isn't matching the servlet urlmapping. ...

How to get jetty to send jsessionid-cookies with the secure-flag when using a secure channel

I am using Tomcat in my production environment and jetty in my testing environment (via jetty-maven-plugin). Tomcat sets the secure-flag on a jsessionid-cookie, when it is sendig it over a secure channel (https), which looks like a good idea to me, becaus it prevents the session from being exposed, when the user klicks on a http://-link...

Tomcat / Spring - Restart Webapp

What's the best approach to use in order to programmatically restart a Spring web app running on Tomcat? I have two specific scneario's I'm considering: Installation The user is configuring the system, providing database connection params etc. Once provided, the Spring data contexts are invalid, and I'd like to restart to re-initializ...

What are the drawbacks of session replication on Tomcat?

I was trying to decide what is better in a Tomcat+Apache reverse proxy mode for session replication. What is more common on deployments? session replication or stick session? Are there any drawbacks for session replication? Thanks ...

IE dynamic image caching issue?

I have an html page that is loading multiple iframes into which are embedded dynamic images created from a Tomcat server page (.jsp). This works as expected from Chrome and Firefox, but for some reason IE displays all of the images the same (as the first image). I've created an example: http://coupondiscounts.com/jsImageTest.html jsIma...

Managing resource closure in a servlet container

I'm using Tomcat as a servlet container, and have many WARs deployed. Many of the WARs share common base classes, which are replicated in each context due to the different classloaders, etc. How can I ensure resource cleanup on context destruction, without hooking each and every web.xml file to add context listeners? Ideally, I'd like...

How to run an app in Tomcat?

Hi! I have put my project in tomcat_home/webapps/ directory. The structure is : project_name/WEB-INF/classes. in WEB-INF i have put my web.xml descriptor. The problem is that when i try to run the application, it doesn't find the files. The error is: The requested resource () is not available. My web.xml content is: <?xml version="1...

JVM tuning on Amazon EC2

We will be deploying a production application to Amazon EC2 very shortly. Initially, we'll just be using a "small" instance, but have plans to scale up not long afterwards. My question is, has any investigation been done on JVM tuning for the EC2 environment? Are there any specific changes that we should make to our JVM parameters to ...

Tomcat cluster installation in a cloud

In a Cloud where multiple VMs are running and with IP addresses being dynamic (dhcp), what is the approach to set up a tomcat cluster. Kindly share your experiences and ideas. One way I can think of is that since dhcp address range is known, the worker.properties file could be created (generated) with all IP addresses in the given range...

Tomcat server (from XAMPP package) cannot be started from Eclipse

I am using Windows 7. I installed Eclipse and updated to include WPT. HTTP Server and Tomcat are installed with XAMPP Package. They run properly and they can be accessed via localhost. But I found that tomcat server cannot be started. Eclipse always reports failed to start. at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:...

Can Apache Solr output HTML instead of XML?

The question is simple - we have a sample / test Solr app running that only responds with XML right now. Is there an easy way to change that output to HTML? Running Tomcat as the app server. ...

Unable to start Tomcat 6.x when Mac OS X 10.6 is boot up

I am using Mac OS X 10.6 and installed MAMP and Tomcat. My Tomcat is installed in /Users/(userID)/Tomcat I can start Tomcat server in Terminal without a problem But it cannot be started automatically when Mac OS X is boot up. I put a file org.apache.tomcat.plist in /Library/LaunchDaemons Disabled Label ...

Remote tomcat deployment

I could set up the environment in my local host, But I have no choice like deploying my war file as its shared server, my admin ask me to extract the war file and upload through FTP. Now the problem is I am new to remote server. Please guide me with the remote environment file system and complete directory structure in remote tomcat. And...

Hibernate exception when starting Tomcat (after upgrade to hibernate-3.5.0)

I'm getting the following exception when starting a tomcat instance with my web app after upgrading to hibernate 3.5.0: org.hibernate.annotations.common.AssertionFailure: Fail to process type argument in a generic declaration. Type: class sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl at org.hibernate.ejb.metamodel.Attri...

customize web application root context in apache

Hi, I have web application abc.war and I want to deploy it on Apache Tomcat. The problem is that, by default, the path to this application is http://&lt;server-name&gt;/abc but I want to access it as http://&lt;server-name&gt;/xyz. I put into WAR's META-INF folder the file context.xml that is : <Context path="/xyz" docBase="abc" ove...

eclipse and tomcat

Hi! I am trying to integrate eclipse with tomcat. My system is Debian Lenny and I have installed tomcat from http://tomcat.apache.org/. My problem is that when launching Tomcat from within eclipse I get the following error: SEVERE: StandardServer.await: create[8005]: java.net.SocketException: Invalid argument at java.net.PlainSock...

Custom realm/starting Tomcat 6.0 from Netbeans 6.8/first HTTP request

I'm using NetBeans 6.8 and Tomcat 6.0.xx. I've created a custom realm and updated the NetBeans project build.xml to deploy the realm to Tomcat. When I debug the project, NetBeans starts the Tomcat server and makes an initial HTTP GET request for 'manager/list'. Tomcat graciously hands this request off to my custom realm for authentica...

How enable GZIP compression for Spring HttpInvoker requests using Tomcat?

Hi, Wondering if anyone has set up GZIP compression for Spring HttpInvoker requests using Tomcat, and what steps are necessary? Also, any advice on whether it's actually worth it; is there much to be gained from trying to compress what are basically serialized Java objects, or do they not really reduce in size much? Thanks, Brian ...