1.配置web.xml文件
2.配置spring-mvc.xml
包括处理器适配器处理器解析器 视图解析器
3.创建一个handle集成 controler
package springmvc;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;
public class itemclass implements Controller {
@Override
public ModelAndView handleRequest(HttpServletRequest arg0, HttpServletResponse arg1) throws Exception {
// TODO Auto-generated method stub
ModelAndView andView = new ModelAndView();
andView.setViewName("/WEB-INF/jsp/newmod.jsp");
return andView;
}
}
4.随便编写的jsp页面
5.测试