html - how do I to retrieve the value of a hidden input[type=submit] from my servlet -
as title says, how retrieve value of hidden input[type=submit] servlet ?
i've tried line, wouldn't work me, modifpost servlet:
public void dopost(httpservletrequest request, httpservletresponse response) throws servletexception, ioexception { string type = (string) request.getattribute("type"); }
knowing have in 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>
Comments
Post a Comment