您的位置:首页 > 运维架构 > Tomcat

Java+Tomcat+MySQL实现简单的网页注册和登录

2017-03-05 12:59 821 查看
<%
// HTTP头信息Expires告诉代理服务器它的缓存页面何时将过期
// no-cache:强制缓存从服务器上获取新的页面
// no-store: 在任何环境下缓存不保存任何页面
response.setHeader("Cache-Control","no-store");
response.setHeader("Pragma","no-cache");
response.setDateHeader("Expires",0);
%>

<%--we use a form to submit the data inputted by users--%>
<%--action=The address to which submitted form data should be sent to--%>
<%--method=The HTTP method by which submitted form data should be sent--%>
<%--name=The name of the form--%>

用户登录

用户名:<%--here this data cell will take up two columns--%>

<%--here we name the inputted data as username and send it to LoginTestServlet--%>
<%--the onfocus attribute is used to clear the default values when the data cell is focused on--%>
密 码
<%--submit the form--%>
<%--reset the inputted data--%>
<%--call the goRegister() function on click--%>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息