I am using JNDI with Tomcat6 to manage Mysql connections, my Catalina/domain.com/ROOT.xml has:
<Resource name="jdbc/db" auth="Container" type="javax.sql.DataSource"
username="db1" password="somepass" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/db?autoReconnect=true" maxActive="15" maxIdle=...
I'm using Tomcat 5.5 with Eclipse and at every startup the Tomcat spawns about 15 to 20 Daemon threads. It's usefull if you want to handle several requests "at once".
This is superficial on my development server and wastes ressources.
How can I reduce this number of Daemon threads?
...
I'm trying to adjust the session timeout using HttpSession.setMaxInactiveInterval and it's not working.
Here is my code (Groovy), which is executing without exceptions:
def paramValue = WebAttributes.REQUEST.getParameter('maxInactiveSeconds');
println 'paramValue=' + paramValue;
if (paramValue != null) {
def seconds = Integer.parseIn...
Is it possible to use the flash.net.NetConnection object to connect to my Flash remoting enabled web application over HTTPS within Tomcat or any other servlet container?
I am using the SpiceFactory cinnamon project for amf remoting and have searched for examples of using HTTPS but see only the reference to a proxy type in the NetConnect...
I'm new to Wicket and would like to maintain a web application from inside itself using some sort of maintenance admin page for running clean-up, DB updates, recovery and so on. Since I plan to use Hibernate or similar for data binding I would like to trigger a complete reboot of the application from inside itself without giving everybod...
Recently I created a maven based web project and used tomcat as application server to debug ...
But tomcat is frequently dead (pergem error which means out of memery ) after run app from the Project context menu directly.
The worst is that It created many idle threads and they are all can not be killed by manually.
And tomcat statu...
I get the error: "Only a type can be imported. XYZ resolves to a package."
Someone has explained the cause here but I am not sure what I supposed to do to fix this. FYI: I am using Eclipse. I have added the code that does the importing below. The java.util.* import works fine.
<%@ page import="java.util.*"%>
<%@ page import="org.ivec...
I have a java process on machine A communicating with a Tomcat on machine B via TCP. The TCP connect (just the syn-syn/ack exchange) takes on the order of 100 ms consistently, while a ping request takes 1 ms (the serves are on the same LAN).
What could cause the increased delay in establishing a TCP connection?
How do I optimize it?
...
I am setting up PHP on my Tomcatserver using the PECL-servlet (PHP/PECL-version 5.2.5). The server now sucessfully handles real PHP-files, but i am having a problem with requests for nonexistent pages.
A request for such a page, f.ex: http://www.mydomain.com/nonexistentfile.php, causes the servlet to raise a java.io.IOException, which i...
Hi,
I use ManagementFactory.getPlatformMBeanServer() from within Apache Tomcat and from a regular JAR file (outside the scope of apache).
I think (And correct me if im wrong) I'm getting different MBean Servers.
My question is - How Do I reach the Tomcat mbean server from outside or alternatively, how do I register the MBeans from ins...
I have a home page home.html inside a war file named "webapp-1.0.war". When the browser requests "http://domain/myapp" I want the home.html served up, but I want the browswer address bar to continue to display "http://domain/myapp". I DO NOT want "http://domain/myapp/home.html" in the address bar.
So I put this into the web.xml:
<wel...
Hey all,
I'm interested in ensuring that a couple of pages in a webapp are only accessible via https, but I don't want to authenticate the users.
Can I do this declaratively with security-constraints. or do I need to do something programmatically?
Any help appreciated, thanks folks
(Tomcat 5.5, servlet spec 2.3 - it's a legacy thing....
Hi,
I have set up tomcat to use a connection pool yet after the mysql timeout on connections the connections previously open in the pool are not opened.Here is what my context.xml file looks like:
<Resource name="jdbc/hpsgDB" auth="Container" type="javax.sql.DataSource"
maxActive="5" maxIdle="3" maxWait="10000"
u...
I am trying to configure cruisecontrol to use Tomcat rather then Jetty servlet engine. I am following a tutorial on this and I am stuck on where it says:
Pass startup parameter to tomcat.
-Ddashboard.config=/home/cruisecontrol/work/dashboard-config.xml
Where do I put this in which file in tomact is it the startup.sh in tomcat directo...
why we need to restart tomcat server when a class file is changed,is there no other way?
...
Currently running fatwire on weblogic, would it be easy to port it to to tomcat, does it require J2EE? If not tomcat how about Jboss?
...
I have a Error404Servlet which is configured as error-page for 404 in web.xml:
<servlet>
<servlet-name>Error404</servlet-name>
<servlet-class>com.foo.bar.Error404Servlet</servlet-class>
</servlet>
<error-page>
<error-code>404</error-code>
<location>/error404</location>
</error-page>
In this servlet...
Hi,
I have observed that while RequestDispatcher.forward(request, response) can throw an IllegalStateException (if the response is committed) , RequestDispatcher.include(request, response) does not throw an IllegalStateException(even if the response was committed before).
I have verified this on Tomcat 6.0.20.
I am aware that the incl...
Anybody knows about a performance comparison for Tomcat vs Websphere app server's web container?
www.webperformanceinc.com provides such a comparison but it's very outdated, somebody knows if there is a newer one, say with Websphere v6.1 or v7?
...
I have a Tomcat application that requires multiple passwords on startup.
My current configuration uses a Java Properties object to load in the passwords from a password.conf file.
There's now a requirement that no passwords are allowed in 'the clear' on the system. I had suggested encrypting the password file, but this isn't an option.
...