How servlet can discover that button was pressed in jsp page?
<p>I have jsp page with many buttons. When I pressed some button it handle in servlet, but how I can identify that button was pressed? I do that:</p>

<pre><code>private String getPressedBtn(HttpServletRequest request){
    Enumeration&lt;String&gt; parameterNames = request.getParameterNames();
    String pressBtn = "";
    if(parameterNames.hasMoreElements()){
        pressBtn = parameterNames.nextElement();
    }
    return pressBtn;
}
</code></pre>

<p>But I think that it's very bad way. Wich way is properly?</p>