Hi, I have a simple servlet running in Tomcat. Because the servlet connects to a database, I need to use connection pooling. However, all the examples on the internet assume that (the developer) will never change which database the servlet is connecting to.
For example, here is a sample context.xml file.
<?xml version="1.0" encoding="U...
I have an application in which users frequently leave the page running in their browser all day. The page has an intervalrendered that updates data every 30 seconds.
However, if the user doesn't interact with the page for a while, it still expires. I'd like it to auto-extend for as long as the browser is open and making the scheduled r...
Hi, Tomcat exposes a good wealth of information about its internals via JMX. You can see data source, connector usage, thread pools, you name it.
However, it also exposes the password of the JDBC datasource (Catalina->DataSource->javax.sql.DataSource->...). Is there any way to hide this information from being published ?
We've found ...
I'm on a vista machine. I've started tomcat 5.5.27 with these options:
CATALINA_OPTS="-Dcom.sun.management.jmxremote.port=9003 \
-Dcom.sun.management.jmxremote.ssl=false \
-Dcom.sun.management.jmxremote.authenticate=false"
When I connect via jconsole and added the following service url
service:jmx:rmi:///jndi/rmi://localhost:...
Currently I am using this for JBoss, but I need something also for an external Tomcat:
Properties props = new Properties();
props.put(Context.PROVIDER_URL, "jnp://localhost:1099");
props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming.client");
props....
Tomcat has an option to use APR for handling connections. What are the benefits of using that? Does anyone have firsthand experience with it?
...
In response to this error where pages are delivered incorrectly, we're considering a switch from Apache + Tomcat to Glassfish. This is inspired not by features, but by frustration with a fault that just won't go away.
The questions are:
Should we use Glassfish in cooperation with Apache, or replace Apache entirely? The interface betwe...
Hi!
I need to do that with tomcat and a J2EE Web App. I don't want a pop up window asking the user for credentials.
I must use the user logged on Windows to authenticate him on my web app.
How can I do it?
Thanks!
...
In Eclipse you can configure numerous servers to run inside the IDE, including Tomcat. Depending on your Tomcat configuration, at some point in the life cycle of a webapp your JSP files will get compiled into servlets. These new servlet .class files are stored in the %TOMCAT_HOME%/work directory along with the .java intermediate file cre...
I'm looking for a best way that is available for Java developers to implement REST services that will be communicating via JSON or XML. I'm looking for production-ready products.
I know that Spring 3.0 is coming, but it's not done yet - no luck.
Is Jersey the one?
My application is hosted by Tomcat, uses Spring, Jettison and XStream....
I have a single Tomcat 6 instance that frequently needs to be rebooted because of PermGen issues after multiple WAR deployments.
In a Production environment it's clearly bad practice to take down the site, leaving any visitors with nothing but a connection failure. The big picture is to set up a fail-over Tomcat cluster of one or two mo...
I've deployed Jersey on Tomcat and everything works perfectly (when I use the com.sun.jersey.spi.container.servlet.ServletContainer), but as soon as I change it to the com.sun.jersey.spi.spring.container.servlet.SpringServlet (according to all the tutorials I can find), I get a nasty exception:
Apr 19, 2009 5:07:35 PM org.apache.catalin...
We have a setup where we have one httpd (apache) with mod_jk talking in a load balance setup to three tomcat servers. We have to recycle each tomcat instance envery three hours. So tomcat1 will restart at 1, and tomcat2 at 2 and ... until tomcat1 recycles again at 4.
We want to configure a script or a type of program to disable the ...
There seems to be multiple extremes when supporting embeddable Java HTTP servers. I have seen minimalist approaches such as NanoHTTPD and leveraging the com.sun.net.httpserver package to attempting to embed Jetty and Tomcat. The ideal embeddable HTTP server would be implemented such that it could be launched via Executor and come with Se...
I am running a J2EE web application in Tomcat, and recently I have been tasked with adding metrics to the application. I am using a SessionListener to detect when the session is destroyed, and then uploading the metrics to a database. My Session timeout is set in my web.xml to 30 minutes, and I am not invalidating the session anywhere ...
I have loaded a static (no servlets, jsp etc) website into the webapps folder of Tomcat.
I have an index.html file under webapps/ourcompany so when I click the ourcompany link in the tomcat manager I am expecting to be taken to the ourcompany/index.html page. However Tomcat keeps redirecting me to localhost:8080/ourcompany/www.ourcompan...
It seems that Hibernate transactional cache mode requires the use of a JTA transaction manager. In an app server such as Glassfish, Weblogic, etc, Spring can use the JTA transaction manager. Tomcat does not have a JTA transaction manager.
Is there one that people use in this scenario? Or do people just not use transactional cache mod...
I have a need to create a HttpSession (via cookie) whenever a client invokes a particular UI.
Assumptions:
Let's assuming that I'm not going to worry about any deep oAuth-like authentication dance. JESSIONSID cookie impersonation is not an issue for now.
The server is tomcat, thus a JSESSIONID cookie is sent down to the client if a n...
Tomcat.exe is consuming 75% of CPU.
Is anyone having any idea why it happens and how can that be decreased?
I am using Tomcat5.5 & J2SDK v 1.4.2_12
...
When pre-compiling JSPs with the Jasper compiler (using Tomcat), and then the Java compiler I see javac warnings like this (I have javac's -Xlint flag enabled):
warning: [unchecked] unchecked call to add(E) as a member of the raw type java.util.List
_jspx_dependants.add("/some-jsp.jspf");
Now, it's "just a warning," but I like clean b...