Error starting Tomcat from NetBeans – ‘*’ 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 pass tomcat port number on command line?

Change your server.xml so that it will use port numbers expanded from properties instead of hardcoded ones: <Server port=”${port.shutdown}” shutdown=”SHUTDOWN”> … <Connector port=”${port.http}” protocol=”HTTP/1.1″/> … </Server> Here’s how you can start in Linux (assuming your current directory is CATALINA_HOME): JAVA_OPTS=”-Dport.shutdown=8005 -Dport.http=8080″ bin/ In windows it should be smth like following: set “JAVA_OPTS=-Dport.shutdown=8005 -Dport.http=8080” bin\startup.bat

How to use HttpServletRequest#getParts() in a servlet filter running on Tomcat?

In order to get HttpServletRequest#getParts() to work in a Filter in Tomcat, you need to set allowCasualMultipartParsing=”true” in the webapp’s <Context> element in Webapp/META-INF/context.xml or Tomcat/conf/server.xml. <Context … allowCasualMultipartParsing=”true”> Because as per the servlet 3.0 specification the HttpServletRequest#getParts() should only be available inside a HttpServlet with the @MultipartConfig annotation. See also the documentation of the … Read more

How does Tomcat locate the webapps directory?

It can be changed in the $CATALINA_BASE/conf/server.xml in the <Host />. See the Tomcat documentation, specifically the section in regards to the Host container: Tomcat 6 Configuration Tomcat 7 Configuration The default is webapps relative to the $CATALINA_BASE. An absolute pathname can be used. Hope that helps.

Is security-constraint configuration for Tomcat mandatory?

No, it’s not necessary. It means that your web application only available through HTTPS (and not available through HTTP). If you omit the <transport-guarantee>CONFIDENTIAL</transport-guarantee> tag (or the whole <security-constraint>) your application will be available through both HTTP and HTTPS. If your web.xml contains <transport-guarantee>CONFIDENTIAL</transport-guarantee> Tomcat automatically redirects the requests to the SSL port if you … Read more

403 Access Denied on Tomcat 8 Manager App without prompting for user/password

This may be work. Find the CATALINA_HOME/webapps/manager/META-INF/context.xml file and add the comment markers around 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> You can find more details at this page.

Is Tomcat running?

On my linux system, I start Tomcat with the script. To know whether it is running or not, i use ps -ef | grep tomcat If the output result contains the whole path to my tomcat folder, then it is running

Custom java.util.logging Handler in tomcat

For the Tomcat-wide custom logging you need to inject your class into the Tomcat bootstrap ClassLoader. Thus jar with custom Handler and required dependencies have to be put into the startup script CLASSPATH. I’d advice to a add custom script at $CATALINA_BASE/bin/, i.e. #!/bin/sh CLASSPATH=”$CATALINA_BASE/bin/myhandler.jar” or you can collect required jars dynamically as script variables … Read more