Nov 5th, 2011, 05:51 PM
Spring Web MVC app problem – deployed as root on a webhost Tomcat server
Hi everyone. This is driving me crazy.
I am new to Spring and I developed my first spring mvc web app using sts/eclipse. It runs perfect inside eclipse’s tomcat server.
The application context is /realtyguide and I run it in eclipse thru http://localhost:8080/realtyguide/
I packaged it in STS/Eclipse by: right click on project “realtyguide” > Run as > Maven package
Webhost server is Tomcat 5.5. I deployed the war file (unzipped it) on my webhost as root application so I can access the website as “mydomain.com” and not “mydomain.com/realtyguide”.
Success. Or so I thought. I am able to bring up the index page thru http://mydomain.com.
Here is the problem:
The css and jquery files are not working. Another problem is that accessing other web pages referenced from the index page also return the error:
“The requested URL /realtyguide/page-name was not found on this server” .
Even though the address bar show a complete URL of http://www.mydomain.com/realtyguide/page-name
It seems like the controller’s @requestmapping is not picking up this URL. I think I lost access to my application context even if the context path is still shown in the request URL.
I am so lost on how to deal with this.
What can I do to have access to the website thru “mydomain.com” instead of “mydomain.com/realtyguide/” without breaking the app.
I’d greatly appreciate your help. Thanks for your time.
Tags for this Thread