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.
tomcat
4,767
questions
130
votes
23
answers
286k
views
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 ...
127
votes
3
answers
157k
views
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 ...
18
votes
1
answer
33k
views
How to properly install and configure JSF libraries via Maven?
I'm trying to deploy a JSF based application to Tomcat 6. The way my build system is setup, the WAR itself doesn't have any libraries in it, because this server is serving a total of 43 apps. Instead, ...
172
votes
14
answers
425k
views
Official reasons for "Software caused connection abort: socket write error"
Given this stack trace snippet
Caused by: java.net.SocketException:
Software caused connection abort:
socket write error at
java.net.SocketOutputStream.socketWrite0(Native
Method)
I ...
141
votes
11
answers
170k
views
Simplest way to serve static data from outside the application server in a Java web application
I have a Java web application running on Tomcat. I want to load static images that will be shown both on the Web UI and in PDF files generated by the application. Also new images will be added and ...
374
votes
14
answers
237k
views
How to get UTF-8 working in Java webapps?
I need to get UTF-8 working in my Java webapp (servlets + JSP, no framework used) to support äöå etc. for regular Finnish text and Cyrillic alphabets like ЦжФ for special cases.
My setup is the ...
174
votes
14
answers
590k
views
How to set the context path of a web application in Tomcat 7.0
I know that I can rename my webapp (or it's WAR file) to ROOT but this is a terrible way to do it, IMHO. Now I checked out the tomcat doc & it says
It is NOT recommended to place elements ...
27
votes
11
answers
76k
views
CORS issue - No 'Access-Control-Allow-Origin' header is present on the requested resource
I have created two web applications - client and service apps.The interaction between client and service apps goes fine when they are deployed in same Tomcat instance.
But when the apps are deployed ...
25
votes
2
answers
79k
views
How should I connect to JDBC database / datasource in a servlet based application?
I have an external MySQL server that's set up and working fine. I created a database connection in Eclipse and can view the database in the Data Source Explorer tab.
Now, I have a servlet that needs ...
16
votes
4
answers
15k
views
Servlet 5.0 JAR throws compile error on javax.servlet.* but Servlet 4.0 JAR does not
I am trying to compile and deploy a simple web app from command line.
servlet-api.jar from Apache Tomcat does not compile my java file, but javax.servlet-api-4.0.1 from the maven central repository ...
25
votes
2
answers
80k
views
java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException
What causes this kind of error in Tomcat?
SEVERE: Exception loading sessions from persistent storage
java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException:
bean....
39
votes
2
answers
41k
views
How to install and use CDI on Tomcat?
I'm creating my first project Java EE 7, but I'm having trouble. Appreciate any help.
Tomcat 7.0.34
JSF 2.2
Primefaces 3.5
javaee-api-7.0.jar
When the application start, the Tomcat log shows the ...
354
votes
14
answers
445k
views
To prevent a memory leak, the JDBC Driver has been forcibly unregistered
I am getting this message when I run my web application. It runs fine but I get this message during shutdown.
SEVERE: A web application registered the JBDC driver [oracle.jdbc.driver.OracleDriver] ...
21
votes
7
answers
47k
views
java.lang.IllegalArgumentException: The servlets named [X] and [Y] are both mapped to the url-pattern [/url] which is not permitted
I tried to add this servlet
package com.classmgt.servlet;
@WebServlet("/ControllerServlet")
public class ControllerServlet extends HttpServlet {}
to my Eclipse project, by editing the web.xml as ...
470
votes
35
answers
755k
views
MySQL JDBC Driver 5.1.33 - Time Zone Issue
Some background:
I have a Java 1.6 webapp running on Tomcat 7. The database is MySQL 5.5. Previously, I was using Mysql JDBC driver 5.1.23 to connect to the DB. Everything worked. I recently upgraded ...