I am quite new in the Spring MVC world and I have a doubt about the corretct creation of a Spring MVC project.
When I run an imported project (for example the Spring MVC Showcase example downlodable form the STS dashboard), inside the browser URL bar this project have an URL like: http://localhost:8080/project-name/
For example the Web MVC Showcase example have project name: "spring-mvc-showcase" and have the following URL: for example the Web MVC Showcase example have project name: "spring-mvc-showcase" and have the following URL: http://localhost:8080/spring-mvc-showcase/
Now, my doubt is related to the creation of a new Spring MVC project using Spring Template in STS\Eclipse.
I do the following operation inside STS:
File --> New --> Project and appears to me a wizard where I can chose the type of project.
So I chose Spring Template Project, now appears to me ano other wizard windows where I can chose the specific typology of Spring Project and I chose "Spring MVC Project"
Ok, now appears to me an other wizard windows in which I have to set up:
Project name and I insert: my-spring-project Top level package and I have insert: org.mycompany.foo
Click your server in your servers are and select the module tab. It should show you your deployed application. Look at the path, this is your context root. You need to type you context root followed by whatever you have mapped. So if you have a request mapping with a value of "/foo" you would go to http://localhost:8080/my-context-root/foo