New detection ordinary web crawl pit project in mind [I]

 

The new detection of a common web project,

1. First, find the need to use some of the code is not added to the package build directory,

To join the building:

 

2. The project then found a large area of ​​error,

Just open look at the code and found that because of the lack jar package, because the error codes too much, so use problem is easier to see the view, the view opens problem and found more than 1,500 errors, in this view, it is easy to see that the majority of errors are of the same type, first find a type, the point went to see the code, find the import section of the head guide package, combined with Baidu based on an error of import, can know what is missing jar package, download it, added to the local directory, other Similarly error handling, and then put the jar package directory as the local user to add a library to the corresponding Eclipse projects,

 

 After the above process, the project can be compiled without error, and then is accessed.

 

The request can not address requirements of the project access to the project, with less access to postman also

First check the structure of the project, to the deployment directory of the Tomcat's webapp directory under the project to see the name of only one of the classes directory, the lack of webcontent directory (webi-info, etc.), is obviously not normal,

 

 After the above operations, can, Tomcat's deployment directory have a basic

 

 

Start the project, first of all Tomcat typing in the browser

 

 

Access to, web.xml configuration file under inspection items and found the welcome page configuration, and then look at the following welcome page:

 

 To join the project in the url address to access the home page, OK

 

Check the relevant servlet in web.xml map, then add the functions specified in the access address, and break points in the code access, OK.

 

4. Modify the context root item as requiring access name:

 

 

Test access, OK.

 

Guess you like

Origin www.cnblogs.com/libin6505/p/11851702.html