tomcat

How do you create "Aliases" in Apache Tomcat?

I am working on a web application that allows users to upload attachments. These attachments are stored on a different drive than that of the web application. How can I create an alias (equivalent to Apache HTTP server's aliases) to this drive so that users can download these attachments? Currently I am creating a context file and dum...

tomcat application missing displayname

I have a little project with some jsp deployed on an Tomcat 5.5. Recently the Servlets which are also deployed with the jsp files (one war archive) stopped working. I also checked out a previous version from my svn which should work. What I noticed that the displayname (I use a german version of Tomcat , so I guess that is how I would tr...

Grails Database Connection Problem When Deployed

I can successfully run my Grails application in Jetty. It succeeds in connecting to my MsSql database and everything is fine. When I deploy that same application in Tomcat 6 on the same machine, I receive the following error on startup in the Tomcat log: Caused by: java.net.ConnectException: Connection refused: connect I don't belie...

Porting JDBCRealm from tomcat to OC4J

I'm porting a servlet from Tomcat 5.5 to OC4J 10.1.3.1. In Tomcat we set up a JDBCRealm for authentication and authorization. This was configured via the $TOMCAT_HOME/conf/server.xml. Is there a similar mechanism in OC4J? Where do I start looking for it? How do I define it? ...

Getting started with Tomcat docs

Are there any good "Getting started with Tomcat" documents/tutorials/sites? The official docs are horribly written and jump from the intricacies of compiling Tomcat to how you should lay out your site on disk. Specifically I want to get Tomcat serving through Apache httpd. ...

How do I serve an image from the cgi directory under Tomcat?

I have configured Tomcat 6 to serve Perl CGI scripts. That part is well documented and works ok for me. But, when a browser requests an image from this CGI dir, Tomcat's CGI servlet refuses to serve the image, displaying instead merely the url of the image. I believe this is a security feature to prevent users from seeing the contents ...

Is it possible to retrieve username, password and roles from a database instead of retrieving them from tomcat-user.xml while using container-managed security

I have a web application which i deploy in Tomcat. I want to secure all pages under the url path administration/*. I have set up container-managed security entering the next snippet in the web.xml file: <security-role> <role-name>administrator</role-name> </security-role> <login-config> <auth-method>BASIC</auth-method> ...

Security of Tomcat versus WebSphere versus WebLogic

The company I work for sells a J2EE application that runs on Tomcat, WebSphere, or WebLogic. We have a customer that is trying to decide between Tomcat and WebSphere. They're leaning towards WebSphere because they're concerned that Tomcat has more security holes. After searching around on the web, I've been unable to find any sites or...

Use Tomcat to serve a directory?

I have a directory on a linux box that I want to make publicly readable using Tomcat (5.5). I think this is easy to set up but can't find the appropriate documentation. Is there a simple way to accomplish this? ...

mvn copy war to webapps

Is there anything I can add to pom.xml that will copy the generated war file from the target directory to my webapps directory? ...

Analyze Tomcat Heap in detail on a production System

Having analyzed a light-load web application running in tomcat, using JMX Console, it turns out the "PS Old Gen" is growing slowly but constant. It starts with 200MB and grows around 80MB/Hour. CPU is not an issue, it runs at 0-1% on average, but somewhere it leaks memory, so it will become unstable some days after deployment. How do i...

How can I specify system properties in Tomcat configuration on startup?

I understand that I can specify system properties to Tomcat by passing arguments with the -D parameter, for example "-Dmy.prop=value". I am wondering if there is a cleaner way of doing this by specifying the property values in the context.xml file or some other tomcat configuration file. I would like to do this because, first, it is eas...

cant import simple class/package into a simple jsp page using apatche tomcat.

can some-one please walk me threw the procces of loading a class or package in jsp with tomcat? i think it might just be a tomcat setup issue :S my jsp file runs fine without importing or using dbpool or dbpooljar. ive tried many suggestions to other peoples similar issues without any luck. any help would be apreciated! //============...

Apache Web Server Redirect Post Request

I configured apache on 4 ports (with virtual hosts as some ports used HTTPS) and the aim is to redirect post requests to different servlets running in a TOMCAT instance on some other machine. The calls are made from a httpclient (java client) . When I run the client it throws the error 301 Error: Moved Permanently. Need hints/tips/help o...

Character encoding JSP -displayed wrong in JSP but not in URL: "á » á é » é"

I have this Web Application in JSP running on JBoss Application Server. I am using Servlets for friendly urls. I'm sending search parameters through my JSP's and Servlets. I am using a form with a text box, the Servlet The first Servlet uses request.getParameter() to get the text, and sends it to another Servlet with response.sendRedir...

Error java.lang.NoClassDefFoundError on org.springframework.webflow.util.RandomGuid

Hi, I am sorry, my question is stupid, but I am not able to answer it, as a java illiterate. I run a tomcat (5) on CentOS5 (for a CAS server), and when I try to open this URL http://192.168.1.17:8080/cas-server-webapp-3.3.1/login I get this error : first error: java.lang.NoClassDefFoundError: Could not initialize class org.springfram...

Wait until tomcat finishes starting up

I have a script that needs to run after tomcat has finished starting up and is ready to start deploying applications. I'm using $TOMCAT_HOME/bin/startup.sh which returns immediately. How can I wait until tomcat has finished starting up? ...

OpenID Java

Is there an openID implementation in Java? I would like to use this in a tomcat application. ...

How can I intercept uncaught exceptions on Tomcat?

I am trying to figure out a clean way to intercept uncaught exceptions that occur in my application. I have log4j configured for logging the normal application flow and caught exceptions, so that is taken care of. Right now, I have a class that takes all error-level messages and adds them to a queue to be emailed in batches. Ideally,...

Tomcat 6 Default Buffer Size

Is there a way to set the default buffer size for JSPs in Tomcat? I know I can set them on every page, but am hoping there's a global option somewhere. ...