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 > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly shows you "how to use springmvc temporarily do not use the view parser to automatically add prefix", the content is easy to understand, well-organized, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to use springmvc temporarily do not use view parser to automatically add prefix" this article.
Springmvc temporarily does not use the automatic prefix of the view parser
When you configure a parser such as the above parser in springmvc.xml, the return address of action is prefixed by default, but sometimes you need to visit a non-jsp page or a view that is not the path above.
Solution method
Precede the view name in action with "request:" (forward) or "redirect:" (redirect).
ModelAndView mv = new ModelAndView (); mv.setViewName ("redirect:/index.jsp"); prefix and suffix usage of springmvc view parser
When there is no suffix:
ModelAndView.setViewName ("/ WEB-INF/jsp/items/itemsList.jsp")
When you have a suffix:
ModelAndView.setViewName ("items/itemsList"); the above is all the content of the article "how to use springmvc temporarily without using the automatic prefix of the view parser". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, 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.