我的动态Web模块版本是3.0,我的tomcat版本是tomcat 7.0.
当我导航到localhost:8080/SimpleProject页面时,我不知道为什么它看不到我的servlet XD .
当我导航到localhost:8080/SimpleProject/firstservlet时,我收到错误消息 the requested resource is not available!
这是我的servlet:
@WebServlet(description = "the first servlet", urlPatterns = { "/firstservlet" })
public class FirstServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// response.setContentType("text/html");
PrintWriter writer = response.getWriter();
writer.println("<h1>Why can't See<h1>");
}
Run Code Online (Sandbox Code Playgroud)
我没有对我的web.xml做任何事情,因为我所知道的是3.0版本的url映射在servlet中.

这是我的文件安排:)

为什么我必须单击formservlet上左上角的保存按钮,以便我的插入查询将保存到数据库?对不起伙计们,非常新手在这里谢谢
这是我的pl sql代码添加按钮触发器:
begin
insert into tb_distributor
(distributor_id, distributor_name, distributor_type, distributor_desc)
values
(distributor_id.nextval,:DISTRIBUTOR_NAME, :DISTRIBUTOR_TYPE, :DISTRIBUTOR_DESC);
commit;
end;
Run Code Online (Sandbox Code Playgroud)