I have a java web application which I can debug using IntelliJ or Eclipse through a local machine tomcat 7 configuration (localhost:8080/javaapp)
I was hoping to be able to reference static content not part of the java application – installed locally at /staticapp. However, IntelliJ launches tomcat with only the java application available, the other application is not launched or serving the files.
Is there a way to configure tomcat so that either:
– the /staticapp is also started when the /javaapp is launched so it may be accessed from /javapp pages
– tomcat will always serve the static content from the /staticapp folder while running… the staticapp folder tree is not a real “web application”, it only contains folders with javascript/css/images
Thanks
In eclipse, open you Tomcat server settings and go to the “Server Locations” option. Choose “Use Tomcat installation”.
Next, change the deploy path to Tomcat’s (original) /webapps folder, instead of the eclipse setting wtpwebapps.
Add your static app manually (folder or .war file) or though eclipse to the webapps folder, then when you publish your “javaapp” Tomcat should start each web application in its deploy path.