tomcat6

Profile Tomcat Application With VisualVM

I would like to profile an application that runs on Tomcat with the VisualVM tool. Unfortunately, when I tell VisualVM to profile Tomcat, Tomcat prints out a couple of messages indicating it is connecting to a profile tool and then simply exits. Details… I am using Windows XP, Tomcat 6, VisualVM 1.2.1, and JDK 1.6.0_11. In Visual VM...

Tomcat runs but complains about missing server.xml

I'm using ubuntu 9.10 and I installed java and tomcat using the package manager. When I went to run startup.sh, it first complains about catalina.out not being there and not being writable. I fixed that and it doesn't complain about that (why isn't that included in the install??) Now it's complaining about server.xml not being there when...

starting tomcat as a service isn't logging in catalina.out

Pretty simple: When I run startup.sh or shutdown.sh information is logged into catalina.out When I run it as a service (i.e. sudo service tomcat6 start/stop) nothing is written to that log. Is it logging somewhere else? Is it logging at all? This is a fresh install of tomcat6 on ubuntu 9.10 ...

How do I undeploy/completley-remove .war deployed under webapps directory when Tomcat 6.x is uninstalled?

Hi All, Does anyone know of a method to remove all webapps deployed from .war files when uninstalling Tomcat (other then Shift + Delete . . .)? The reason I ask is is described below. I am using InstallShield 2009 to lay down a copy of the JRE and Tomcat 6.x, where the Tomcat start/stop uses org.apache.catalina.startup.Bootstrap and i...

pdf in iframe in jsp on tomcat, also Struts2

Hello Everyone, I'm having some issues getting my pdf file to display in my jsp page. I have the pdf saved on my tomcat server with a file location as follows c:/tomcat 6.0/webapps/appname/reports/saved/filename.pdf I am trying to open that file (preferably not using the c: location) and displaying it in an iframe in my jsp file using ...

MySQL like query runs extremly slow for 5000 records table.

I have this issue on our production server. The application stack is, Java Web App on Tomcat 6.0.18 iBatis data access layer MySQL 5.0 database CentOS The system is deployed on virtual server having around 256 MB memory. Real problem: The query like, select * from customer executes in around 10 seconds however if the following q...

Tomcat Referrer Lockdown

I know using referrer is a bad idea but I need a quick fix to lockdown content inside a folder on a tomcat application this is just the temp fix until we can get a long term one in place. I would like to use the referrer header to block off site linking to one directory. I need to do this directly in Tomcat if possible. Thanks for a...

How to Attach styleSheet.css in tomcat (Servlet)

Hey! I have made a webpage in Servlet and now i want to add a stylesheet.css to it Where should i exactly put the .css file ? like in ROOT of tomcat or some where else and what exact path i have to use?? link href='style.css' rel='stylesheet' type='text/css' Thanks Sundhas ...

Apache 2 + Tomcat 6 + Mod_jk: How can I close the port 8080 ?

Hi all, I'd setup Apache 2.2 with Mod_Jk so that all Tomcat 6 pages is piped through Apache, port 80. Everything work fine, all pages look good. My question is: How can I close the port 8080 listened by Tomcat ? Since right now all pages are served from port 80 by Apache, the port 8080 from Tomcat should not be accessed by end-user. ...

Add Tomcat repository to Eclipse

I have installed Tomcat6 and eclipse, and don't know how to add a Tomcat server to Eclipse: File=>new=>Other=>CVS "Add a new CVS repository in Eclipse" Host: localhost Path: /usr/share/tomcat6 User:anonymous Connectionstype: pserver + Use default port In Preferences SSH2 => SSH2 home : /etc/ssh "Could not connect to pserver:anonymous@...

How do I let a user know that his/her session has expired?

I have set Tomcat to dispose of sessions after 15 minutes of inactivity. Something like this <session-config> <session-timeout>15</session-timeout> </session-config> Whenever a user accesses a restricted page (one that requires a user to be logged in) I check the session to see if the login process has been completed. If it has th...

Why my jsp changes are not reflected without restarting tomcat?

I am editing the jsp files which are residing directly inside tomcat/webapps/myapp/web-inf. But to see the changes i have to restart the server these. As far as i know, jsp changes don't require you to restart the server. The only configuration i found which was related to automatic reloading is reloadable = "true" Set to true if you...

Can I configure the ROOT application to be accessed from another path in Tomcat 6?

I have an application that is deployed as ROOT.war under /webapps in Tomcat. As it is configured now, I can only access the application via http://www.example.com. I'd like to be able to access it using http://www.example.com/myapp without having to change the fact that it is deployed as ROOT. I have the following in my ROOT.xml: <Co...

Caught exception while loading file struts-default.xml

I'm not that new to Java. I've done plenty of stuff with it before. But I'm migrating from PHP to Java Servlet/JSP (which I am new to) and I can't figure out this error to save my life. I installed Tomcat6 using Ubuntu 9.04's Synaptic Package Manager and it works like a charm. But when I put struts in my WEB-INF/lib directory and try to ...

Apache+Tomcat6+Struts2 redirect problem

I'm using apache on 80 port, that forwarding all requests on tomcat6 on port 8080. In my application I'm using struts2 framework. In tomcat I'm using redirect from ROOT application to my application "MyApp". When I walk on the links on my site I see good URLs like www.mysite.com/order But when struts redirects me anywhere URLs take ...

Hibernate fails with NullPointerException in EntityTuplizerFactory.constructTuplizer? Why?

I have a problem when I try to instantiate Hibernate and connect with a MySQL database (see error message below). Curiously enough the connection works fine using the exact same hibernate.cfg.xml file when running Junit tests but it refuses to work when run from Tomcat... I am starting to run out of ideas. Any clues or tip where to l...

which one will be given priority in Tomcat 6: index.html or index.jsp ?

Our web app contains both index.html and index.jsp, and we use Apache Tomcat 6. When a request having the path till the context (for eg.,http://localhost:8080/mysite) comes to the tomcat which one will be served ? Is this index.html or index.jsp ? Is it configurable ? ...

Java: using endpoint to publish webservice to tomcat server

hi all, i am creating a simple SOAP web service. i am to ensure that it runs on a tomcat web service. im trying to implement this with JAX-WS (see code) my question is: does the Endpoint.publish use the tomcat server to host this or is it a mini glassfish kind of server? should i be extending UnicastRemoveObject or something simili...

Tomcat not recognizing context in web service

I have a webservice running on tomcat (and working). I would like to extract the endpoint URL into a file outside the war, so that it can be changed without needing to redeploy the war. I am running locally with Tomcat 6 standalone on Windows XP. My thought was to have it in the Context, either as a context param or as an Environment va...

GWT - java.security.AccessControlException: access denied for serializer in ubuntu/tomca6 deployment

Hi all, I am trying to deploy my gwt app to tomcat6 under ubuntu 9.10 and get the (i suppose known to many of you) "java.security.AccessControlException: access denied" error (Full exception can be found at the end). I have searched the net in general and found that the Java default security permissions are preventing the serializer...