I am trying to use JSP to handle a form submission, but am seeing some
really strange things when I try this. Following is an example of the
relevant code, :
<% if (useraccount.getProcessed() == "1")
{
...
%>
processed status : <%=useraccount.getProcessed() %>
<%
...
useraccount.setProcessed("0");
}
%>
<form ... onSubmit=<%useraccount.setProcessed("1"); %> >
It seems that when I hit the page, even before I submit the form, the JSP
code is run twice.
The output that I get looks like
processed status : 1
processed status : 0
What I want to do is have the JSP actually run one of the procedures in the
Bean that updates the database when the Submit Button is pressed. If anyone
can offer any help I would greatly appreciate it. Thanks.
Quenten
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html