1 基本结构
2 操作
2.1 Web.xml
2.2 Index.jsp
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false" %>
<c:set value="${pageContext.request.contextPath}" var="path" scope="page"/>
<!DOCTYPE html>
<html>
<head>
<title>方正管理系统</title>
</head>
<body>
<script type="text/javascript">
window.open('${path}/index.do','_parent');
</script>
</body>
</html>
2.3 PageController
@Controller
public class PageController {
//访问首页(暂未使用)
@RequestMapping("/")
public StringshowIndex() {
return "index";
}
//
@RequestMapping("/{page}")
public StringshowPage(@PathVariable String page) {
return page;
}
}