【问题标题】:how to remove "resource not found error in servlet"?如何删除“在 servlet 中找不到资源错误”?
【发布时间】:2016-04-03 01:53:50
【问题描述】:
<html>

<body>

<table border="1" align="center" style="width:50%;height: 50%;border-bottom-   style: solid;border-bottom-width: thick;">
<tr>
    <td align="center" ><h2>welcome user</h2>

     <form method="post" action="Register">
    <input type="submit" value="view full list" />
    </form>
    </td>

</tr>

</table>
</body>
</html>

我已经在我的 jsp 页面中创建了一个 servlet Register。我已经调用了该注册 servlet....当我单击查看完整列表但我收到错误 http404 resource not found(仅当单击查看所有列表时)

【问题讨论】:

  • 当您点击时,您正在向/Register 发送请求,您似乎没有任何东西可以处理对该 URL 的请求。
  • 如果您尝试将表单提交到 Regsiter.jsp,那么您需要在 action 属性中指定 Register.jsp。

标签: java jsp servlet-3.0


【解决方案1】:

试试这个

<form method="post" action="Register.jsp">

【讨论】:

  • 提到了一个注册servlet。
  • 注册是一个servlet
猜你喜欢
  • 2021-06-02
  • 2020-06-29
  • 1970-01-01
  • 1970-01-01
  • 2016-12-05
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多