templet.jsp

来自「java web开发技术方案宝典」· JSP 代码 · 共 28 行

JSP
28
字号
<%@ page contentType="text/html;charset=gb2312"%>
<%@ taglib uri="struts-html" prefix="html" %>
<%
  String path=request.getContextPath();
  String basePath=request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
  String mainPage=(String)request.getAttribute("mainPage");
  if(mainPage==null)mainPage="reg.jsp";
%>
<html>
<head>
  <title>校园信息网</title>
  <base href="<%=basePath%>"/>
  <link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body background="image/bg.gif">
  <center>
      <table border="0" cellspacing="0" cellpadding="0" bgcolor="#FCFEF1">
          <tr><td colspan="2"><%@ include file="/view/top.jsp" %></td></tr>
          <tr>
              <td height="30" align="left"><jsp:include page="/view/menu.jsp"/></td>
              <td rowspan="2" align="center" valign="top"><jsp:include page="/view/right.jsp"/></td>
          </tr>
          <tr height="450"><td align="center" valign="/view/top"><jsp:include page="<%=mainPage %>"/></td></tr>          
          <tr><td colspan="2"><%@ include file="/view/end.jsp" %></td></tr>
      </table>
  </center>
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?