问答详情
源自:4-3 Controller-现代方式

程序运行后视图没有获取到图片和课程信息

程序运行没有获取到图片和课程信息,如图所示:

http://img.mukewang.com/58bfef1b00015baf10010699.jpg

我截取的认为重要的控制台打印信息如下:

22988 [qtp1095203437-15] WARN  org.springframework.web.servlet.PageNotFound  - No mapping found for HTTP request with URI [/$%7Bcourse.imgPath%7D] in DispatcherServlet with name 'mvc-dispatcher'

22988 [qtp1095203437-15] WARN  org.springframework.web.servlet.PageNotFound  - No mapping found for HTTP request with URI [/$%7Bcourse.imgPath%7D] in DispatcherServlet with name 'mvc-dispatcher'

380997 [qtp1095203437-17] DEBUG org.springframework.web.servlet.DispatcherServlet  - Null ModelAndView returned to DispatcherServlet with name 'mvc-dispatcher': assuming HandlerAdapter completed request handling

380997 [qtp1095203437-17] DEBUG org.springframework.web.servlet.DispatcherServlet  - Null ModelAndView returned to DispatcherServlet with name 'mvc-dispatcher': assuming HandlerAdapter completed request handling

这是什么问题?

提问者:慕姐2973146 2017-03-08 19:49

个回答

  • 慕姐2973146
    2017-03-10 11:06:52

    以上问题已经解决,是在web.xml文件中,web-app标签后面忘了加如下配置:

    <?xml version="1.0" encoding="UTF-8"?>

    <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"

       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

       xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee

       http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">  



  • 慕粉2353217001
    2017-03-09 17:20:20

    json