The Web project created by Spring MVC, how do I know the project name of its web and access the specific link address?
Visit url:http://localhost:8090/Firstapp/login
In Eclipse's integrated run environment, often multiple apps, you need to specify their project name when you access an app.
However, SPRINGMVC creates an MVC project whose Web project name is not the project name.
In fact, the name of the Web project is: When you create the SPRINGMVC project, you specify the last level name of the registration.
The problem is rather annoying. Unlike previous Web projects, this is a special note.
For example: The SPRINGMVC project we created: Spring-mvc-first, package Name: Com.yank.firstapp, the name of the Web project is Firstapp. This is also the projectname in the connection we visited
1. You can find the Web project name by viewing the web properties
Right-click Projects--Properties-->web project Settings to see the Web project name.
Of course, it can also be modified here.
2, through the service to start the log, recompile, re-load when you can see
Of course the attentive classmate, you can see the project name when the server loads:
info:org Path [/resources/**] onto handler ' org.springframework.web.servlet.resource.resourcehttprequesthandler#0' info:org . Springframework.web.servlet.dispatcherservlet-frameworkservlet ' Appservlet ': initialization completed in 480 04, 2015 5:33:34 pm org.apache.catalina.core. [/firstapp] is completed
3, through the Pom.xml file view
If the SPRINGMVC more familiar with the classmate, may not be so mealy.
When creating a project, there is a pom.xml configuration file in the root directory of the project, which contains:
<Projectxmlns= "http://maven.apache.org/POM/4.0.0"Xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance"xsi:schemalocation= "http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelversion>4.0.0</modelversion> <groupId>com.yank</groupId> <artifactId>firstapp</artifactId> <name>Spring-mvc-first</name> <Packaging>War</Packaging> <version>1.0.0-build-snapshot</version> </Project>
Let's take a look at GroupID and Artifactid, which is actually the package name we define.
GroupID is the unique identifier of the project organization, which actually corresponds to the structure of the Java package
Artifactid is the unique identifier of the project, the name of the actual project, which is the name of the project root directory.
The Web project created by Spring MVC, how do I know the project name of its web and access the specific link address?