路徑是按web.xml配置的路徑,但是還是顯示404錯誤
This is the description of my J2EE component
This is the display name of my J2EE component
DeleteStuServlet
servlet.DeleteStuServlet
<servlet-mapping>
<servlet-name>DeleteStuServlet</servlet-name>
<url-pattern>/servlet/DeleteStuServlet</url-pattern>
訪問時是這樣的:
<a href=../servlet/DeleteStuServlet?stu_id=<%=rs.getString(3)%>>刪除</a>
前面../代表父路徑,,可能是路徑的問題,,建議樓主用絕對路徑試一下,,${pageContext.request.contextPath}/servlet/DeleteStuServlet試試