Debugging a Java web application with a tomcat secondary folder serving static content.

I have a java web application that can be debugged using IntelliJ or Eclipse through the local tomcat 7 configuration for the computer (localhost:8080/javaapp)

I was hoping I could link to static content that is not part of the Java application locally installed in /staticapp . However, IntelliJ starts tomcat with only a java application available, another application does not start or does not serve files.

Is there a way to configure tomcat so that: - /staticapp also starts when / javaapp starts, so it can be accessed from / javapp pages - tomcat will always execute static content from the / staticapp folder while it works ... The staticapp directory tree is not is a real "web application", it contains only folders with javascript/css/images

thanks

+4
source share
1 answer

In eclipse, open your Tomcat server settings and go to "Server location". Select Use Tomcat Installation.

Then change the deployment path to the Tomcat (original) / webapps folder instead of configuring eclipse wtpwebapps.

Add your static application manually (folder or .war file) or even eclipse into the webapps folder, and then when you publish your “javaapp”, Tomcat should launch each web application in its deployment path.

0
source

All Articles