Login_top.jsp 文件
需去除的代码:
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
主代码:
<form action="" method="post">
登陆名:<input type="text" name="name">
密码:<input type="password" name="pwd">
<input type="submit" value="登陆">
</form>
index.jsp中放入login_top.jsp头部:
<body>
<%@ include file="login_top.jsp" %>
</body>
index.jsp中放入login_top.jsp《Div中》:
可以实现类似HTMl的框架功能:--出现在框架左边
<body>
<div id="top">top</div>
<div id="left"><%@ include file="login_top.jsp" %></div>
<div id="right">right</div>
</body>
需去除的代码:
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
主代码:
<form action="" method="post">
登陆名:<input type="text" name="name">
密码:<input type="password" name="pwd">
<input type="submit" value="登陆">
</form>
index.jsp中放入login_top.jsp头部:
<body>
<%@ include file="login_top.jsp" %>
</body>
index.jsp中放入login_top.jsp《Div中》:
可以实现类似HTMl的框架功能:--出现在框架左边
<body>
<div id="top">top</div>
<div id="left"><%@ include file="login_top.jsp" %></div>
<div id="right">right</div>
</body>