Charlie100
Programmer
When I redirect to same page with a post method, I get a error page in IE - "Page not available....Cannot find server or DNS error".
If I change the method to a GET , or change the page to any other page, it works fine.
Example code below. Note, I find this code works when I am developing in VisualAge for Java 3.5 under the Websphere Test Environment, but fails when I deploy on Websphere Server 3.5.3.
Thanks, in advance.
If I change the method to a GET , or change the page to any other page, it works fine.
Example code below. Note, I find this code works when I am developing in VisualAge for Java 3.5 under the Websphere Test Environment, but fails when I deploy on Websphere Server 3.5.3.
Thanks, in advance.
Code:
<%@ page session="true" isThreadSafe="true"
isErrorPage="false" buffer="512kb" autoFlush="true" %>
<HTML>
<HEAD>
<TITLE>Test redirecting</TITLE>
<%
response.setHeader("pragma", "no-cache");
response.setHeader("Cache-Control", "no-cache");
response.setHeader("Expires", "0");
if(request.getParameter("var")!=null){
response.sendRedirect("[URL unfurl="true"]http://company:8080/Test.jsp");[/URL]
}
%>
<SCRIPT>
function doSubmit() {
var f = document.mainForm;
f.submit();
}
</SCRIPT>
</head>
<BODY>
<FORM name="mainForm" method="post" >
<INPUT type="text" name="var">
<INPUT type="button" value="Search" onclick="doSubmit()">
</FORM>
</body>
</html>