Questions tagged [tomcat]

Use this tag for questions about Apache Tomcat (or simply Tomcat, formerly also Jakarta Tomcat) which is an open source Servlet Container developed by the Apache Software Foundation (ASF). Most questions should also include a tag specifying the operating system.

Apache Tomcat (or simply Tomcat, formerly also Jakarta Tomcat) is an open-source web server and servlet container developed by the Apache Software Foundation (ASF).

Apache Tomcat is an open-source software implementation of the , Java Server Pages (), and Java API for technologies. The Java Servlet, JSP, and Java API for WebSocket specifications are developed under the Java Community Process. Apache Tomcat is developed in an open and participatory environment and released under the Apache License version 2.

Resources

Documentation

Downloads

Books

43039 questions
138
votes
13 answers

How to change the ROOT application?

I'm trying to change the default application of a Tomcat 6 webserver to a different application than "ROOT" (inside webapps folder). What is the best way to do this?
Jacques
131
votes
6 answers

Tomcat - CATALINA_BASE and CATALINA_HOME variables

I have multiple instances of tomcat 6 running on the same server (Linux) and it works as expected. I am trying to find out what the standard practice is with regards to setting the CATALINA_HOME and CATALINA_BASE variables. In my tomcat…
souser
  • 5,868
  • 5
  • 35
  • 50
131
votes
3 answers

Best TCP port number range for internal applications

I work in a place where each of our internal applications runs on an individual Tomcat instance and uses a specific TCP port. What would be the best IANA port range to use for these apps in order to avoid port number collisions with any other…
Juanal
  • 4,344
  • 3
  • 19
  • 18
130
votes
18 answers

Is Tomcat running?

Interested to know how people usually check to see if Tomcat is running on a Unix environment. I either check that the process is running using ps -ef | grep java ps -ef | grep logging or i check that the port number is active netstat -a | grep…
ziggy
  • 15,677
  • 67
  • 194
  • 287
127
votes
10 answers

Change Tomcat Server's timeout in Eclipse

When I try to run my Tomcat I get a message: Server Tomcat v6.0 Server at localhost was unable to start within 45 seconds. If the server requires more time, try increasing the timeout in the server editor. Where is this server editor? I didn't find…
Dejell
  • 13,947
  • 40
  • 146
  • 229
127
votes
2 answers

Recommended way to save uploaded files in a servlet application

I read here that one should not save the file in the server anyway as it is not portable, transactional and requires external parameters. However, given that I need a tmp solution for tomcat (7) and that I have (relative) control over the server…
Mr_and_Mrs_D
  • 32,208
  • 39
  • 178
  • 361
126
votes
13 answers

What does "The APR based Apache Tomcat Native library was not found" mean?

I am using Tomcat 7 in Eclipse on Windows. When starting Tomcat, I am getting the following info message: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the…
fresh_dev
  • 6,694
  • 23
  • 67
  • 95
126
votes
21 answers

The infamous java.sql.SQLException: No suitable driver found

I'm trying to add a database-enabled JSP to an existing Tomcat 5.5 application (GeoServer 2.0.0, if that helps). The app itself talks to Postgres just fine, so I know that the database is up, user can access it, all that good stuff. What I'm trying…
Rick Wayne
  • 1,503
  • 2
  • 12
  • 11
126
votes
3 answers

CATALINA_OPTS vs JAVA_OPTS - What is the difference?

I was trying to find out the difference between Apache Tomcat variables - CATALINA_OPTS and JAVA_OPTS in SO and surprised to see that there is no question/answer posted here yet. So I thought of sharing it here (with answer) after finding out the…
Gnanam
  • 10,613
  • 19
  • 54
  • 72
122
votes
6 answers

Access Tomcat Manager App from different host

I have installed tomcat 9 on a remote sever and after starting it, it was brought up fine, I can access http://host_name:port_num and see tomcat hello page. But when I try to open manager app to see my deployed apps, I get 403 access denied, I…
feichangh
  • 1,293
  • 3
  • 10
  • 8
119
votes
10 answers

Strip whitespace from jsp output

How can I strip out extra whitespace from jsp pages' output? Is there a switch I can flip on my web.xml? Is there a Tomcat specific setting?
Seth Weiner
  • 2,999
  • 5
  • 26
  • 14
118
votes
4 answers

IntelliJ says 'cannot run program '/path/to/tomcat/bin/catalina.sh' error=13 permission denied

In intelliJ ulimate, running a bare bone spring mvc application I get the error: 'cannot run program '/path/to/tomcat/bin/catalina.sh' error=13 permission denied How to I fix this? (i'm on a mac)
Blankman
  • 259,732
  • 324
  • 769
  • 1,199
116
votes
2 answers

Tomcat - maxThreads vs. maxConnections

In Tomcat's server.xml what is maxThreads versus maxConnections? I understand that maxConnections is the number of connections open to the server. And maxThreads is the maximum number of request processing threads . But how do these two…
JavaSheriff
  • 7,074
  • 20
  • 89
  • 159
116
votes
11 answers

Eclipse "Server Locations" section disabled and need to change to use Tomcat installation

I have set up a dynamic web project in Eclipse with a Tomcat 5.5 installation. I want to be to set the server to us the Tomcat installation instead of the workspace metadata location, but when Eclipse displays the "Overview" screen for the server…
Craig Angus
  • 22,784
  • 18
  • 55
  • 63
114
votes
4 answers

How to change Apache Tomcat web server port number

How to change Apache Tomcat web server default port number? I am developing a web application in JSP, in that for some purpose I need to change tomcat accessing port. Is there any possibility?
Siva Siva
  • 1,189
  • 2
  • 7
  • 5