How to prevent file locking when undeploying a Tomcat web app?

This is very common in Windows environment but there is a solution via the antiResourceLocking context property: Open context.xml from /tomcat/conf folder and modify the context to match this : <Context antiResourceLocking=”true”> Edit: Updated properties following @JanM comment. Previously it also contained ‘antiJARLocking’

How can I specify system properties in Tomcat configuration on startup?

cliff.meyers‘s original answer that suggested using <env-entry> will not help when using only System.getProperty() According to the Tomcat 6.0 docs <env-entry> is for JNDI. So that means it won’t have any effect on System.getProperty(). With the <env-entry> from cliff.meyers‘s example, the following code System.getProperty(“SMTP_PASSWORD”); will return null, not the value “abc123ftw”. According to the Tomcat … Read more

Increase Tomcat memory settings [duplicate]

try setting this CATALINA_OPTS=”-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server -Xms1536m -Xmx1536m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m -XX:MaxPermSize=256m -XX:+DisableExplicitGC” in {$tomcat-folder}\bin\setenv.sh (create it if necessary). See http://www.mkyong.com/tomcat/tomcat-javalangoutofmemoryerror-permgen-space/ for more details.

Tomcat 8 Maven Plugin for Java 8

Yes you can, In your pom.xml, add the tomcat plugin. (You can use this for both Tomcat 7 and 8): pom.xml <!– Tomcat plugin –> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.2</version> <configuration> <url>http:// localhost:8080/manager/text</url> <server>TomcatServer</server> *(From maven > settings.xml)* <username>*yourtomcatusername*</username> <password>*yourtomcatpassword*</password> </configuration> </plugin> tomcat-users.xml <tomcat-users> <role rolename=”manager-gui”/> <role rolename=”manager-script”/> <user username=”admin” password=”password” roles=”manager-gui,manager-script” /> </tomcat-users> settings.xml (maven … Read more

How do you configure tomcat to bind to a single ip address (localhost) instead of all addresses?

Several connectors are configured, and each connector has an optional “address” attribute where you can set the IP address. Edit tomcat/conf/server.xml. Specify a bind address for that connector: <Connector port=”8080″ protocol=”HTTP/1.1″ address=”127.0.0.1″ connectionTimeout=”20000″ redirectPort=”8443″ />

Access Tomcat Manager App from different host

For Tomcat v8.5.4 and above, the file <tomcat>/webapps/manager/META-INF/context.xml has been adjusted: <Context antiResourceLocking=”false” privileged=”true” > <Valve className=”org.apache.catalina.valves.RemoteAddrValve” allow=”127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1″ /> </Context> Change this file to comment the Valve: <Context antiResourceLocking=”false” privileged=”true” > <!– <Valve className=”org.apache.catalina.valves.RemoteAddrValve” allow=”127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1″ /> –> </Context> After that, refresh your browser (not need to restart Tomcat), you can see the manager page.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)