Jan 30th, 2010, 08:24 AM
Changing Tomcat Context in example app
Hey, everyone! Just getting started here with roo and am really excited about this project.. Such an easy way to get things started! Thanks to everyone involved.
This might be more of a spring question (to which I am also new), but I've successfully created a simple 'myproject' app and deployed it with mvn tomcat:run and everything works great. However, I'd like to change the context from myproject/ to ROOT/ (ie - http://localhost:8080 instead of http://localhost:8080/myproject). I can't seem to figure out how to do that.
I've seen some posts about changing the Web-ContextPath in the MANIFEST.MF file. I've tried that by adding it to the pom.xml, but tomcat doesn't seem to be picking that up. Any suggestions?
Jan 31st, 2010, 06:04 PM
there are several ways to approach this. The easiest is to create a war file ('perform package'), and then rename your war file to ROOT.war. Then drop it into the tomcat webapps folder and you should be able to access the app from the root URL http://localhost:8080
Note, this would overwrite the default Tomcat manager app which usually lives there.
You can also configure it via the a Tomcat specific context.xml file which is explained here: http://tomcat.apache.org/tomcat-6.0-...g/context.html
Feb 1st, 2010, 08:04 AM
Thanks for your quick reply.. I really appreciate it. I'll try out the context.xml in the tomcat conf/ directory! I'll let you know how it works out.