In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Performance of the problem:
Eclipse uses the spring-mvc framework to develop web projects, the project can visit the jsp page after normal start-up, but the page effect of the jsp page does not take effect, and prompts the jsp file to prompt js can not find, 404 error.
(1) preliminary judgment:
When debug in the browser, the jsp page indicates that the js file cannot be found and indicates a 404 error. Since the name of the project is littlec-exchange-center and the name of the project is exchangecenter in the url during the visit, it is preliminarily judged that the path is wrong.
Try to solve the problem: check the server.xml configuration under the conf path of tomcat as follows:
As you can see, although the path to the packaged file under tomcat is littlec-exchange-center, the access path is / exchangecenter. So there's nothing wrong with the path.
(2) continue to search: the js file cannot be found in the source view of the browser, but there is a js file in the project packaged into tomcat. It is further determined that there is a problem with the access of static files such as js.
Try to solve it: create a new test.html under the same path as the jsp file and write "test" in it. Accessing localhost:8080/exchangecenter/test.html directly or prompting a 404 error.
It can be basically determined that it is a problem of static resource access. The place where static resources are loaded in spring-mvc is in the dispatcher-servelt.xml file we defined. After spring-mvc3.0, it is recommended to use configuration:
After this configuration, spring can find it when the pumped _ picture _ picture _ CSS and other files have been placed in the resources file.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.