I am novice in the UI, we are trying to implement a web call using a JQuery where we are have observer a strange issue of webcall i.e, when we are trying to do a post http call we have observer in server access logs first http post call is made and then immediately one http get call exist.
Please find below the .jsp page:
<html>
<head>
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<%
String urlVal = (String) request.getAttribute("dataURL");
%>
<%
String emailID = (String) request.getAttribute("emailID") ;
%>
<script type="text/javascript">
var url="<%=urlVal%>";
alert(url);
function navigateWithForm() {
var form = $('<form></form>');
form.attr({
method: 'POST',
action: url
});
form.append(getInput());
form.appendTo('body').submit();
}
function getInput() {
alert("<%=emailID%>");
return $('<input type="hidden" />').attr({
name: 'header',
value: '<%=emailID%>'
});
}
$(document).ready(function() {
navigateWithForm();
});
</script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
</html>
In the backend the service are deployed in weblogic and it is designed in the spring 2.5 framework. We have apache proxy server for load balancing.
Any help will be appreciated.