IntelliJ and Tomcat….changed files are not automatically recognized by Tomcat

This cannot be done if you deploy a war with IntelliJ IDEA. However, it can be if you deploy an exploded war. In IDEA: open your Tomcat Run/Debug configuration (Run > Edit Configurations) Go to the “Deployment” tab In the “Deploy at Server Startup” section, remove (if present) the artifact my-webapp-name:war Click the add icon, … Read more

Error starting Tomcat from NetBeans – ‘127.0.0.1*’ is not recognized as an internal or external command

Assuming you are on Windows (this bug is caused by the crappy bat files escaping), It is a bug introduced in the latest versions (7.0.56 and 8.0.14) to workaround another bug. Try to remove the ” around the JAVA_OPTS declaration in catalina.bat. It fixed it for me with Tomcat 7.0.56 yesterday. In 7.0.56 in bin/catalina.bat:179 … Read more

How to change the port of Tomcat from 8080 to 80?

1) Go to conf folder in tomcat installation directory e.g. C:\Tomcat 6.0\conf\ 2) Edit following tag in server.xml file <Connector connectionTimeout=”20000″ port=”8080″ protocol=”HTTP/1.1″ redirectPort=”8443″/> 3) Change the port=8080 value to port=80 4) Save file. 5) Stop your Tomcat and restart it.

How to use JNDI DataSource provided by Tomcat in Spring?

If using Spring’s XML schema based configuration, setup in the Spring context like this: <beans xmlns=”http://www.springframework.org/schema/beans” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:jee=”http://www.springframework.org/schema/jee” xsi:schemaLocation=” http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee.xsd”> … <jee:jndi-lookup id=”dbDataSource” jndi-name=”jdbc/DatabaseName” expected-type=”javax.sql.DataSource” /> Alternatively, setup using simple bean configuration like this: <bean id=”DatabaseName” class=”org.springframework.jndi.JndiObjectFactoryBean”> <property name=”jndiName” value=”java:comp/env/jdbc/DatabaseName”/> </bean> You can declare the JNDI resource in tomcat’s server.xml using something … Read more

How to set the context path of a web application in Tomcat 7.0

What you can do is the following; Add a file called ROOT.xml in <catalina_home>/conf/Catalina/localhost/ This ROOT.xml will override the default settings for the root context of the tomcat installation for that engine and host (Catalina and localhost). Enter the following to the ROOT.xml file; <Context docBase=”<yourApp>” path=”” reloadable=”true” /> Here, <yourApp> is the name of, … Read more

Official reasons for “Software caused connection abort: socket write error”

This error can occur when the local network system aborts a connection, such as when WinSock closes an established connection after data retransmission fails (receiver never acknowledges data sent on a datastream socket). See this MSDN article. See also Some information about ‘Software caused connection abort’.

Tomcat VS Jetty [closed]

I love Jetty for its low maintenance cost. It’s just unpack and it’s ready to roll. Tomcat is a bit high maintenance, requires more configuration and it’s heavier. Besides, Jetty’s continuations are very cool. EDIT: In 2013, there are reports that Tomcat has gotten easier. See comments. I haven’t verified that.

Apache Tomcat Not Showing in Eclipse Server Runtime Environments [duplicate]

In my case I needed to install “JST Server Adapters”. I am running Eclipse 3.6 Helios RCP Edition. Here are the steps I followed: Help -> Install New Software Choose “Helios – http://download.eclipse.org/releases/helios” site or kepler – http://download.ecliplse.org/releases/kepler Expand “Web, XML, and Java EE Development” Check JST Server Adapters (version 3.2.2) After that I could … Read more

What is username and password when starting Spring Boot with Tomcat?

I think that you have Spring Security on your class path and then spring security is automatically configured with a default user and generated password Please look into your pom.xml file for: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency> If you have that in your pom than you should have a log console message like this: Using default … Read more