tomcat6

Why is Tomcat manager using my LoginModule?

Hello, I'm running Tomcat 6.0.29 and created a realm and loginmodule of my own. They are defined in server.xml like so: <Realm className="mycompany.tomcat.MyRepositoryRealm" appName="My_Realm" userClassNames="mycompany.tomcat.IdentityPrincipal" roleClassNames="mycompany.tomcat.RolePrincipal" useContextClassLoader="true"/> I have adde...

Intercept calls to HttpSession in Tomcat 6

What's the recommended approach to intercepting session.getAttribute() and session.setAttribute()? This is in a Spring based application so something AOP-based would be great. I'd like to avoid having to override core Tomcat classes if possible. Update: I want to store the actual serialized attributes in a web service. ...

Having Netbeans autodeploy war file to tomcat

Greetings all Currently working on assessing a project, and wondered if there was a way to have it so the war file generated whe the project is built can be autodeployed to a specified directory to be used by tomcat. I'm using netbeans 6.9.1 on ubuntu 10, with tomcat 6, and while I figured there was a way to do this in the application, ...

Deployment from URL

Is it possible to deploy a remote war file automatically when my tomcat (6) boots? I am thinking about pointing my context.xml to http://myrepos/myapp.war, but could not find a example of this, what is the corret attribute to set? ...

Get the server port number from tomcat with out a request

Is there any Tomcat API or configuration available which can tell an application (probably on startup), what port its running on without a request?? *EDIT* Imagine a scenario where there are two web applications running in the same tomcat and one of which need to invoke a web service from the other one. We don't want the request to l...

best way for Jetty to serve multiple wars hot

I have a new 64-bit Ubuntu server with 4G of memory. I need to serve several (6 now, maybe 50 later) war files as their own context roots. (Similar apps from a commmon code base branded differently). I'm more comfortable with Jetty than Apache. I can just drop the wars in /usr/share/jetty6/webapps. But how can I add new ones without ...

java.nio.BufferOverflowException in certificate authentication

I am implementing Client certificate authentication with Spring security using tomcat server I have configured tomcat server and added <X-509> tag in my application_context.xml. then i started server. and when i was trying to login i got above exception. Configuration for tomcat : <Connector port="8443" protocol="org.apache.coyote.htt...

Is there a tomcat anonymous role or user for tomcat security realms?

I want a certain role to be protected with a username/pw in some environments, but not require even a prompt in others. If i have an auth-constraint in a tomcat web.xml, can I create a user with the role needed that is 'anonymous' access? ...

Why is richfaces fileupload double-escaping my message?

I am using richfaces 3.3.3 final and want to have a localized file-upload. Therefore i use something like this: <rich:fileUpload id="myUpload" ... addControlLabel="#{msgs.DO_ADD}" clearAllControlLabel="#{msgs.DO_CLEAR_ALL}" clearControlLabel="#{msgs.DO_CLEAR}" stopEntryControlLabel="#{msgs.DO_CANCEL}" uploadContr...

How to check if Tomcat runnning using Embedded Tomcat

In reference with one of the articles: Howto embed Tomcat 6? I understood how to embed tomcat in a java application. Thanks for that. However I need to know if there is any elegant method provided by org.apache.catalina.startup.Embedded to check if the container is already started or not? For example, if I create a batch file for the e...

Strange Tomcat trailing slash redirect domain handling

I have a Tomcat 6 webserver running my application and I am seeing some very strange redirect behaviour. I expect to access my application at the internal URL http://appteam.testdomain.co.uk/test and that this will return a 302 redirect to http://appteam.testdomain.co.uk/test/ which then serves up index.html, the front page of the appli...

Tomcat6 configured to use SSL does not work

I am trying to setup SSL to my web app and followed tutorial (http://techtracer.com/2007/09/12/setting-up-ssl-on-tomcat-in-3-easy-steps/), then hitting http://localhost:8443 returns "unable to connect" Environment: Tomcat6, windows 7 Tomcat6 is up and running, http://localhost:8080 displays tomcat page. Below is the step I took so fa...

Tomcat 6 connection pool goes wacky when CMS GC is used

We recently changed to the CMS garbage collector on our server (XX:+UseConcMarkSweepGC) which worked fine in tests. When we went to production, things were OK for the first few hours, but then we suddenly began to see the dreaded: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idl...

Java, Tomcat 6: saving files to local HD

Hi all, I've searching for this for a while now online (Google, and StackOverflow), but haven't yet come across this question. Maybe my query is not correct (please redirect then!) I've developed and set up a WebApp on TomCat 6 under Linux. Tomcat isn't running in a virtual host environment yet, I have full control over server. Therefo...

Getting Tomcat and MySQL to talk to each other in NetBeans

Hello Having rebuilt my Windows 7 PC, I am trying to get Tomcat running under NetBeans to connect to MySQL. I believe MySQL is alright because the various tools retrieve data correctly. But when my Java web app is run from NetBeans, Tomcat shows the homepage but then gives a Java null pointer error. The logs tell me this is to do with ...

logging in tomcat

Hi, i want to log for a web apps in tomcat6. The log file is located at /project/Log in ubuntu. I am using juli as the logger for my log and i have no logging.properties define. Instead, i just hardcode the handler and the path of the logger in a class called LogHelper. Here is the code of it: ` package de; import java.io.File; import j...

tomcat6: cannot create directory for logging in linux

i use ubuntu 9.04 for testing platform. I have created a webapp that log a hardcoded string whenever someone visit index.jsp. I have enable SECURITY_MANAGER in /etc/init.d/tomcat6. And I have grant permission for the webapp named w1 with grant codeBase "file:${catalina.base}/webapps/w1/-" { permission java.security.AllPermission; }...

EJBs 2.0 on OpenEJB - Where do I put the needed jars?

Hi everybody. We've been using WAS 6.1 so far to deploy our web apps. Now we need to migrate to an economics-savvy Tomcat + OpenEJB solution. The OpenEJB 3.1.2 container is plugged into Tomcat 6.18, no standalone OpenEJB server here. So here I am, trying to deploy my EJB 2.1 objects into OpenEJB... My problem is that the EJBs code req...

What java comet-style framework is the most mature and robust?

There seems to be significant issues with Tomcat6/Comet/NIO (example). Are the majority of people doing asynchronous http using something else? Jetty/continuations? What about Glassfish's servlet 3.0 implementation? Others? ...

Getting Tomcat to reload a web app with a static context

I have a Host that doesn't automatically deploy all web apps. <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="false" xmlValidation="false" xmlNamespaceAware="false"> But I do want the dreambear web app to automatically reload without a restart, for development purposes (hence this is on SO, no...