tomcat

Spring view resolution problem

Spring, Spring MVC 2.5, Tomcat 6.0. In my controller: ModelAndView returnModelAndView = new ModelAndView(new InternalViewResolver("/sandbox/test1.jsp")) Was working. Then I switched the Tomcat (6.0) context path from "/appname" to "" in order to reference the webapp from the root context "http://localhost:8080/". All my filter, intercep...

Tomcat does not recognize the MySQL .jar library

I tried several different ways such that Tomcat loads the MySQL drivers when running my web application. I'm using Ubuntu 8.04, and the libraries come from the libmysql-java package. They are located in the directory shown below: ~$ ls /usr/share/java/mysql* /usr/share/java/mysql-connector-java-5.1.5.jar My CLASSPATH includes this fi...

java.lang.NoClassDefFoundError help

I'm trying to read a mail from Tomcat 6.0. Whenever I put the byte code and source code of the class MailReader in the same folder(and putting the main method), I can compile and run the class and read mail from command prompt, but when I put that class in the folder WEB-INF/classes of tomcat(by removing main method), I'm getting big fat...

Tomcat's CLASSPATH is different than Java's, and it does not include "." How do I change it?

I've been spending hours trying to figure out why I've been getting the java.lang.NoClassDefFoundError, and I've narrowed down the cause to Tomcat's classpath. I used the code below to see what the path variables hold: out.println("Classpath: '" + System.getProperty( "java.class.path" ) + "'" ); out.println("Ext dirs: '" + System.getPr...

Configuring Tomcat to consume webservice over SSL

Which steps should be taken to consume a web service on a remote server over SSL? The application is a Java application using Axis WS Framework running on Tomcat 6. I'm aware of e.g. the instruction on http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html, which, however seem to mainly describe how to configure the server to accept SSL...

Auhtorize.net (CIM) sample code not working with tomcat webapplication

I have been trying to integrate Authorize.Net ( Customer Information Manager (CIM) ) I got their sample code [ wsimport -s /tmp/RebillAPI -p AuthNet.Rebill https://apitest.authorize.net/soap/v1/Service.asmx?wsdl ] Their sample code works fine as stand-alone program, but not working in our tomcat web application. It throws an error below ...

Introducing a Java stats package to an application?

I currently have a web application and wish to add certain statistics to the site. These statistics would be in addition to web statistics. I can easily log certain events to a file via log4j. Is there something I can add that will investigate the data and format it in a human readable way (chart or table)? The application is running i...

Tomcat performance issue

I've got a web application that's running really slowly and occasionally hanging. It's a school-related Wicket app with reporting and editing, and also a servlet which is used by automated clients to get/post data via HTTPS. During busy times where a lot of editing/uploading/downloading is going on, the app becomes sluggish and unrespo...

Tomcat App says "Unable to configure the logging system. No log.properties was found."

I have an embedded tomcat app and whenever I start it up I see this error printed to the console twice: Unable to configure the logging system. No log.properties was found. It seems stupid, but I've done some googling and searched stackoverflow and can't seem to find someone experiencing this problem. My main class Looks roughly lik...

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! ...

How does Tomcat sandbox web apps?

I have a web app that is being served through Tomcat. My app lets users submit their own workflow which will then be executed on the server. My problem is how to control how much memory each user is taking up on the server. I think Tomcat itself runs apps in a sandbox of its own. I say this because when my app runs out of memory and cras...

Measuring the Size of HttpSession object

Is there a clean and easy way to measure it other than programatically measuring the size of each data type (that each object is composed of) stored in session? ...

Web service logging not outputting, but not failing

I'm having trouble finding/getting any logging output from a web service. I have a web service running through axis2 in a Tomcat6 container, the .aar file contains this structure: root/ log4j.properties lib/ slf4j-api.jar slf4j-log4j12.jar log4j-1.2.jar com/ all of my classes META-INF/ ...

Is there a way to make Tomcat start an app up as soon as the WAR has been deployed?

My app has a bit of expensive setup to do when it first starts up. It appears that as soon as I copy the WAR file in webapps, the log file says "Deploying web application archive Navaid.jar", but it doesn't actually run anything until I hit the URL. I'd rather than have the first person to hit the url endure the wait time for this star...

Sharing Session object between different web applications

Okay this is the problem I have a Java application running on top of Apache Tomcat & I have this other application too with its own war file running on the same server. Now I want to authenticate user once & pass that session to the other application. We can say cross domain session sharing on same Apache Tomcat .. how should I go abo...

Best practices for deploying Java webapps with minimal downtime?

When deploying a large Java webapp (>100 MB .war) I'm currently use the following deployment process: The application .war file is expanded locally on the development machine. The expanded application is rsync:ed from the development machine to the live environment. The app server in the live environment is restarted after the rsync. T...

Maven embedded Tomcat version

Is there a way to control the Maven embedded Tomcat version? mvn tomcat:run This command will run a Tomcat 6.0.16 instance. I'd like to run a 5.5 version of Tomcat. Is there a way to configure this? Searching the plugin docs didn't help... Thanks! ...

How to point a DomainName to an Apache Tomcat Server?

I have a domain name and I want to point it to a local apache tomcat server that I have installed and started on my machine(static IP) What kind of configuration I need to do with the DNS(at the website of the domain name company) and tomcat configuration files - I assume! PS. I am using Tomcat6 on a linux machine with static IP Man...

Session Clustering a Grails app in Tomcat

Has any one done it yet? I am having class loader problems de-serializing the grails session object. Here is the error: WARN net.spy.memcached.transcoders.SerializingTranscoder: Caught CNFE decoding 1168 bytes of data [exec] java.lang.ClassNotFoundException: com.myapp.User [exec] at org.codehaus.groovy.tools.RootLoad...

Failure to import javax.servlet

I know this is a common error, but bear with me. I've pursued the CLASSPATH problem and I don't think that is the issue. I'm getting an error like this. ./src/process.java:2: package javax.servlet does not exist import javax.servlet.*; I installed Tomcat and the Java SDK, and I know that Tomcat is supposed to supply the servlet API. ...