In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the SpringMvc page returned to modelandview can not jump the problem of how to solve the relevant knowledge, the content is detailed and easy to understand, the operation is simple and fast, with a certain reference value, I believe that after reading this SpringMvc page returned to modelandview can not jump how to solve the problem of the article will have a harvest, let's take a look at it.
On the problem of modelandview jump
Xiaobai has just begun to learn to use the springmvc framework, after configuring the simple web.xml file and the springmvc configuration file springmvc file, excitedly unloaded a simple helloworld test demo to see the effect. The request path to the controller is: login.do; control
Device returns an instance of modelandview after processing, and sets the
As usual, he should jump to the helloworld.jsp page, but he still jumps to login.jsp, and many times he jumps to login.jsp (this page does not exist, this is the path to the controller). After many attempts were fruitless, they turned to du Niang and finally found the problem! It is because the introduced package is misled! What I'm introducing is
This package, but what should be introduced is
These two packages look very much alike, and mistakes will be introduced a little carelessly, resulting in a jam in the development, especially for a rookie like me who is just getting started.
Modelandview jump error
When the code is executed to the control layer, until the end
Return new ModelAndView ("learnDemo/learnDemo/menuListDemo")
The page does not jump properly and always jumps to the error page.
Reason: wrong bag!
Error package:
Import org.springframework.web.portlet.ModelAndView
Correct package:
This is the end of import org.springframework.web.servlet.ModelAndView; 's article on "how to solve the problem that SpringMvc can't jump back to modelandview". Thank you for reading! I believe that everyone has a certain understanding of the knowledge of "how to solve the problem that the page of SpringMvc can not jump back to modelandview". If you want to learn more knowledge, you are welcome to follow the industry information channel.
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.