404错误,The requested resource is not available.

偶尔吧偶尔 偶尔吧偶尔 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区


要实现的功能,点击删除就能删除学生信息
web.xml的配置:


删除链接:


servlet代码:
package servlet;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import bean.CrtlSql;//这是实现数据库连接的类


public class DeleteStuServlet extends HttpServlet {

private static final long serialVersionUID = 1L;


public DeleteStuServlet() {
super();
}

public void destroy() {
super.destroy();
}

public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {

CrtlSql con=new CrtlSql();
String stu_id=request.getParameter("stu_id");
String sql="delete from student where stu_id='"+stu_id+"'";

con.con();//数据库连接
con.update(sql);
response.sendRedirect("ifram/stu_info.jsp");
}


public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
doGet(request,response);
}


public void init() throws ServletException {

}

}

...全文

相关推荐

HTTP_Status_404(The_requested_resource_is_not_available)的几种解决方案_补充

HTTP_Status_404(The_requested_resource_is_not_available)的几种解决方案_补充

炒冰

HomeBrew 下载时出现 404 错误

今天在macbook上安装软件时,homebrew出现了404的错误: curl: (22) The requested URL returned error: 404 Not Found Error: An exception occurred within a child process:   DownloadError: Failed to download resource “ant–bcel” 经过查看,homebrew寻找的该软件版本写的是 6.1.13版本,而当我找到该软件网站时,发现它已经是6.1.14版本了,所以应该是homebrew没有及时更新,所以使用以下命令更新一下ho

weixin_38748740

Spring MVC 404 Not Found无错误日志的解决方法

主要为大家详细介绍了Spring MVC 404 Not Found无错误日志的解决方法,具有一定的参考价值,感兴趣的小伙伴们可以参考一下

weixin_38748556

IIS HTTP 错误 404.17 – Not Found 解决方法

错误提示如下图: 出现这种情况的原因通常是因为先安装了Framework,后安装的IIS; 运行cmd,输入: 代码如下:C:\Windows\Microsoft.NET\Framework\V4.0.30319\aspnet_regiis -i      注:C:\Windows\Microsoft.NET\Framework\V4.0.30319\   是 netframework安装对应的路径; 如下图: 注册成功后,重启一下iis, 理论上应可以解决导致404.17 not found 的大部分问题了; Win7中IIS出现“HTTP 错误 404.17 – Not Foun

weixin_38622777

IIS HTTP 错误 404.17 - Not Found 解决方法

主要介绍了IIS出现Errore HTTP 404.2 - Not Found" IIS 7.5 请求的内容似乎是脚本,因而将无法由静态文件处理程序来处理问题的解决方法,需要的朋友可以参考下

weixin_38539705
评论 7
收藏 已收藏
分享
返回顶部
偶尔吧偶尔
Web 开发 81,107 成员 341,720 内容