I have to call a Java method based on a button click event, but method is being called when i refresh the page. Is there a way to restrict the call only when the button is clicked? please help me
This is my jsp code:
<%@ page language="java" import="sourcejava.*"%>
<%
if(request.getParameter("btnsubmit") != null)
{
Xmlparse p = new Xmlparse();
p.parse();
}
%>
<input type="button" id="btnsubmit" name="btnsubmit" value="parse"/>