02 2021 档案
摘要:Index.jsp <a href="servlet/HelloServlet">servlet/HelloServlet</a><br> <a href="<%=request.getContextPath() %>/servlet/HelloServlet">HelloServlet</a> <
阅读全文
摘要:package util; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class DBHelper { // 0,导入jar包 // 1,数据库驱动
阅读全文
摘要:RegServlet // 保存到 session request.getSession().setAttribute("user", user); userinfo.jsp // 读取 session <jsp:useBean id="user" class="entity.User" scope
阅读全文
摘要:状态码消息描述 100 Continue 只有一部分请求被服务器接收,但只要没被服务器拒绝,客户端就会延续这个请求 101 Switching Protocols 服务器交换机协议 200 OK 请求被确认 201 Created 请求时完整的,新的资源被创建 202 Accepted 请求被接受,
阅读全文
摘要://在post提交的页面顶部插入下列代码 <% request.setCharacterEncoding("UTF-8"); %>
阅读全文
摘要:<role rolename="manager-gui"/> <user username="tomcat" password="tomcat" roles="manager-gui"/>
阅读全文
摘要:以tomcat9为例 第一步 :下载到本地并解压文件 解压后: 第二步:配置环境变量,在系统变量中添加 CATALINE_HOME ,路径为tomcat的目录 启动tomcat , 启动之后不要关闭tomcat的启动窗口(因为关闭后tomcat的服务也会断掉)。 最后,打开浏览器输入 localho
阅读全文