保险INFO.jsp:
<div class="content">
<h3>Insurance policies</h3><br><br>
<form action="/Project/src/servlet/PolicyServlet" method="POST">
<jsp:useBean id="pBean" class="servlet.Policy"/>
<jsp:setProperty name="pBean" property="policyNo" value="P1"/>
<h2>P1</h2>
<input type="hidden" name="P1value" value="P1">
<input type="submit">
</div>
</form>
我调用 servlet 的路径是否正确?我也尝试过“form action="/PolicyServlet"。它不起作用:(我无计可施。尝试了谷歌的许多解决方案,但都没有奏效。任何帮助都得到了认可
错误:
HTTP Status 404 <br>
The requested resource (/Project/src/servlet/PolicyServlet) is not available.
这是我的项目布局。(我无法发布图片,因为我是新用户。对不起..)
Project-
Java Resources-
src-
servlet-
PolicyServlet.java
WebContent-
views-
zyViews-
InsuranceINFO.jsp