前端控制器显示不了页面

图片说明图片说明


DispatcherServlet
org.springframework.web.servlet.DispatcherServlet

    <init-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath:config/springmvc/springmvc.xml</param-value>
    </init-param>

    <load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
    <servlet-name>DispatcherServlet</servlet-name>
    <url-pattern>/</url-pattern>
</servlet-mapping>
<context:component-scan base-package="com.facelib.tt.admin.controller.*">
<context:include-filter type="annotation"
    expression="org.springframework.stereotype.Controller" />
</context:component-scan>
@Controller
public class BookInfoContrller {

    @Autowired
    private BookInfoService bookInfoService;
    @Autowired
    private BookTypeService bookTypeService;


@RequestMapping(value="/book-list",method=RequestMethod.GET)    
public ModelAndView findtype(ModelAndView model){
    Map<String, Object> queryMap =new HashMap<String, Object>();
    model.addObject("booktype",bookTypeService.findlist(queryMap));
    model.setViewName("jsp/book-list");
    return model;
}
@RequestMapping(value="/tohome")
public String tohome(){
    return "home";
}

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<jsp:forward page="/WEB-INF/jsp/home.jsp">;

1个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐