1

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"/> 
sathish_at_madison
  • 823
  • 11
  • 34
FreshBits
  • 1,003
  • 4
  • 13
  • 25

0 Answers0