• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP form submission problem  RSS feed

 
Casper Serrano
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

i have a jsp that performs a document.form.submit().
my issue right now is, there are times the submission is done two times.
but there are instances that its just one time only.

below is the jsp, that im editing:

<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%@ page import="java.util.*"%>

<html>
<head></head>
<body>
<form name="txnForm" action="<cut value="${url}"/>" method="post">
<c:if test="${message != null && message!= ''}">
<input type="hidden" name="message" value="<cut value="${message}"/>"/>
</c:if>


<c:if test="${MESSAGE!= null && MESSAGE!= ''}">
<input type="hidden" name="MESSAGE" value="<cut value="${MESSAGE}"/>"/>
</c:if>

<c:if test="${Referer_url!= null && Referer_url!= ''}">
<input type="hidden" name="Referer_url" value="<cut value="${Referer_url}"/>"/>
</c:if>

<% //get and set all parameters
Enumeration names = request.getParameterNames();
while(names.hasMoreElements()){
String n = (String)names.nextElement();

//message parameter not use in epg success/failure/cancel page
if(!n.equals("message") && !n.equals("gw_url") && !n.equals("submit")) {
%>
<input type="hidden" name="<%=n%>" value="<%=request.getParameter(n)%>"/>
<%
}
}

%>


</form>

<script>
document.txnForm.submit();
</script>
</body>
</html>




then when i check the logs. the action class that accepts this inputs will execute and process those data.. after 15 seconds.
another instance will be executed aswell, but this time there are no more values on those fields.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!