@Controller
@RequestMapping("/bangding")
public class BangdingTest {
@RequestMapping(value="/login")
public ModelAndView login(){
String message = "Welcome next time!";
System.out.println("message***************************"+message);
return new ModelAndView("bangding/bangdingTest");
}
}
The jsp page mapped to is login.jsp instead of bangdingTest.jsp
An error such as the title may be a package import error:
When using ModelAndView to return to the view, no error may be reported in the background, but the corresponding jsp page cannot be parsed. At this time, there may be a package import error:
import org.springframework.web.portlet.ModelAndView;--wrong package
import org.springframework.web.servlet.ModelAndView;--correct package