正如标题所说,我如何从我的servlet中检索隐藏输入[type = submit]的值?
我已尝试过这一行,但它对我不起作用, ModifPost servlet:
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
String type = (String) request.getAttribute("type");
}
知道我的JSP中有这个:
<form method="post" action="<c:url value="/modifpost"/>" class="sansRetourLigne">
<input type="text" disabled style="visibility: hidden;" class="sansRetourLigne" name="type" value="p" />
</form>
web.xml :
<servlet>
<servlet-name>ModifPost</servlet-name>
<servlet-class>com.forum.servlets.ModifPost</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ModifPost</servlet-name>
<url-pattern>/modifpost</url-pattern>
</servlet-mapping>