tomcat6

Tomcat6 on Linux uses 100% CPU whenever ServerSocket is idle

Greetings I am running my webapp on Tomcat6 on Java6 on Ubuntu8.04. The main servlet of this app opens a ServerSocket, with the following simple code: ServerSocket serverSocket = new ServerSocket(6767); Socket xmlSocket = serverSocket.accept(); Of course this runs in a separate thread and with the necessary try-catch blocks....

Grails + Tomcat + Ubuntu problem: CLOSE_WAIT connections

I have encountered a really bizarre stability problem in production when running a trivial Grails application using standard components. After some time of normal operation the number of Tomcat (jsvc) TCP connections in state CLOSE_WAIT increases until Tomcat hits its thread ceiling (Maximum number of threads (N) created for connector),...

Tomcat 6 JSF/JSP filename configuration problem

Hello I've a JSF app deploying from Eclipse Ganymede through Tomcat 6. The latter suggests JSP 2.0. I'm using Sun RI JSF implementation and RichFaces 3.3.2SR1. My index.jsp file on request from the browser causes this error to the console: 05-Mar-2010 12:04:41 org.apache.catalina.core.ApplicationDispatcher invoke SEVERE: Servlet.se...

AccessControlException when trying to redeploy webapp to Tomcat using Netbeans

I'm getting the following error trying redeploy an webapp on Tomcat from within Netbeans 6.8. It has probably something to do with the new deploy on save and hot swap functionality. Any ideas how to resolve this issue? INFO: Error registering wrapper with jmx StandardEngine[Catalina].StandardHost[localhost].StandardContext[/CubeAdSaSim2...

Is Tomcat 6 ready for continuous integration or how to get it work?

I'm looking for a hint how to make tomcat CI ready or an servlet container / application container which stand often redeploys like they happen when using hudson ci. I experienced that Tomcat 6 does not properly undeploy webapps, leaving classes in jvm. For example I monitored tomcat 6 with VisualVM: on start 2000 classes, on deploy ...

MultiActionController no longer receiving requests?

I was attempting to make changes to my controller, and all of a sudden, I no longer seem to receive any requests (404 when attempting to hit the servlet mapped URLs). I'm sure I've broken my web.xml or app-servlet.xml, but I just don't see where. I can access index.jsp from tomcat (http://IP/app/index.jsp), but I can't get my servlet map...

Tomcat 6 customized Realm

Hi, I'm trying to write my own Realm to authenticate my users. I have written a class extending org.apache.catalina.realm.RealmBase, compiled to a .jar file and put it in the /lib library. Then I added this to server.xml: <Realm className="wstest.tomcat.security.MyRealm" resourceName="myrealm"/> Tomcat doesn't seem to "se...

run a servlet program in tomcat 6.0

How i can run a servlet program in tomcat 6.0? ...

Install mod_jk with Apache 2.2

I have downloaded mod_jk-1.2.28-httpd-2.2.X.so for Apache 2.2 running on CentOS, and set up as per http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html. When I try to start httpd it fails with the following error: "Starting httpd: httpd: Syntax error on line 993 of /etc/httpd/conf/httpd.conf: Syntax error on line 2 of /opt...

josso newbie setup problems - can't use tomcat's manager page

I'm trying to setup josso on an apache tomcat server running on windows. I've installed Apache Tomcat/6.0.26 fro zip file to c:\tomcat then installed josso following the documentation at http://www.josso.org/confluence/display/JOSSO1/Quick+Start started tomcat with c:\tomcat\bin\startup.bat, and noticed the following warnings ADV...

Automatically add "www" on tomcat

How can I set Tomcat to automatically redirect to "www"? I want that if a user enters my domain like: mydomain.com he will be redirected to: www.mydomain.com ...

401 Unauthorized in Tomcat

Hello, I'm using Tomcat 6.0 as a webserver, and I'm trying to open tomcat manager page, but whenever I enter the username as specified in tomcat-users.xml file, I'm getting an error as: **401 Unauthorized** Here's my tomcat-users.xml file: <tomcat-users> <role rolename="manager"/> <user name="admin" password="" roles="admin,manage...

Mechanism of tomcat

This is tomcat loader structure: Bootstrap | System | Common / \ Webapp1 Webapp2 ... My question is how does the loaders actually work? Do they load all classes when tomcat is started even when there is no request? Or they load necessary classes when a request comes in? And ho...

Writing to a comet stream using tomcat 6.0

Hey I'm new to java servlets and I am trying to write one that uses comet so that I can create a long polling Ajax request. I can successfully start the stream and perform operations but I can't write anything out. Here is my code: public class CometTestServlet extends HttpServlet implements CometProcessor { /** * */ ...

Load balancing, connection loop

Hi all, I've set up load balancing using Apache, Tomcat through ajp connector. Here the config Apache/httpd.conf BalancerMember ajp://10.0.10.13:8009 route=osmoz-tomcat-1 retry=5 BalancerMember ajp://10.0.10.14:8009 route=osmoz-tomcat-2 retry=5 < Location /> Allow From All ProxyPass balancer://tomcatservers/ stickysession=JSE...

Tomcat 6 thread safe email queue (javax.mail.*)

Hi I have design/architecture question. I would like to send emails from one of my jsp pages. I have one particular issue that has been a little bit of a problem. there is an instance where one of the pages will need to send around 50 emails at near the same time. I would like the messages sent to a queue where a background thread wi...

How to run Spring 3.0 PetClinic in tomcat with Hibernate backed JPA

OK, this probably is supposed to be the easiest thing in the world, but I've been trying for the entire day, and it's still not working.. Any help is highly appreciated! EDIT: For the correct procedure, please see Pascal's answer. My wrong (since I did not disabled LoadTimeWeaving) procedure is left for reference..: What I did: D...

Tomcat 6.0 doesn't set Cookies in webkit based browsers on localhost

I'm working on a website that runs on Tomcat 6.0 at localhost:8080. Interestingly enough, Tomcat seems to only be able to set cookies on Firefox. Opera and WebKit based browsers (Chrome, WinSafari) seem to fail. Is this a known issue and is there a solution? ...

Servlet stops without giving any exception

Hi, I have implemented a Servlet hosted on Tomcat 6 server on Mandriva Linux. I have been able to make the client communicate with the Servlet. In response to a request the Servlet tries to instantiate a another class (named KalmanFilter) located in the same directory. The KalmanFilter tries to create four Matrices (using Jama Matrix pac...

How do I log from inside my web application in Tomcat 6.

How do I log from within my web application deployed on Tomcat 6? Where should I expect the logging output to go (internal tomcat log files, or will another logfile be generated)? I see a ton of documentation but am having a hard time finding a direct answer to the above questions. Where should I expect the logging to show up (current...