When I create a Spring MVC Template Project with the SpringSource IDE, I run the application and the root URL is set as the last word of the default package name:
For example, when I create the project, I set the default package as com.sample.myapp
. When I run the application, it opens at http://localhost:8080/myapp
. Why does the root URL not use my project name, MyProject
, instead?
This is a problem because I have to specify all of the URL's in my application to /myapp/resources/css/mycss.css
but when I export a .war and deploy it to a Tomcat server, then Tomcat expects the project name instead (it wants me to use /MyProject/resources/css/mycss.css
. As a result, all of my links are broken when I deploy (but not when I run on tomcat locally within the SpringSource IDE...)
Has anyone else run into this problem?
Example for comment discussion below:
<bean id="serviceProperties" class="org.springframework.security.cas.ServiceProperties">
<property name="service"
value="https://localhost:8443/MyProject/j_spring_cas_security_check" />
<property name="sendRenew" value="false" />
</bean>