URL "base" de Spring Roo

I'm current building a fairly simple webapp using Spring Roo. It seems, however, that Spring apps by default deploy to "/{app name}", rather than "/" as the top level directory. That is, controllers are mapped by "/{app name}/person", rather than just "/person". After poking around considerably, I couldn't see where this would be fixed. Is it a setting somewhere?

preguntado el 24 de agosto de 12 a las 21:08

Hi Aaron, as you are new to StackOverflow, I have a little hint for you: It is much more likely to get an answer fast, if you phrase your question as a question and if you include all names in it. So it would be better not to use "it" in the question, if possible. For example: `How can I change the Spring Roo "Base" URL?". Just a minor hint. -

2 Respuestas

The base path is defined by the application server, not the application itself. In the pom.xml, overwrite the following plugins:

maven-war-plugin - mvn package, mvn tomcat:run-war

                <!-- exclude test files from war package -->

tomcat-maven-plugin - mvn tomcat:run


org.mortbay.jetty - mvn jetty:run


Respondido el 02 de Septiembre de 12 a las 09:09

Assuming your Spring Roo application runs on Apache Tomcat, what you can do is to configure the Tomcat Root context.

You can do this in following ways.

  1. Defina un archivo de contexto ROOT.xml en conf / Catalina / localhost
  2. Nombra tu aplicación web WAR "ROOT.war" o la carpeta que contiene "ROOT"

More information can be found on the following link.



Respondido 26 ago 12, 18:08

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.