Hello experts,
I have this problem, I have a jsp working PERFECTLY on local machine as well as on the private network.... Now I want to get it working over the internet...
This code is working on the network as well as on my local machine. I'm using Tomcat 5.0 as my websever, and I have the latest version of java installed on ALL machines.
the code for the JSP page is as follows...
<%@ page import= "java.sql.*,
java.util.Vector,
com.sun.rowset.*,
javax.sql.*,
java.io.*,
org.w3c.dom.*,
javax.xml.parsers.*,
org.xml.sax.*" %>
<%
response.setHeader("Cache-
Control","
no-cache")
; //HTTP 1.1
response.setHeader("Pragma
","no-cach
e"); //HTTP 1.0
response.setDateHeader ("Expires", -1);
ObjectInputStream ois = new ObjectInputStream(request.
getInputSt
ream());
String strSource = (String)ois.readObject();
ois.close();
String strCommand = "";
String strConnStr = "";
String strParamStr = "";
String strBytes = "";
CachedRowSetImpl objCrs = null;
int nResult = 0;
EDO objEDO = new EDO();
ObjectOutputStream oos;
Document xmlDocIn = null;
DocumentBuilder builder= null;
DocumentBuilderFactory builderFactory = DocumentBuilderFactory.new
Instance()
;
InputSource source = new InputSource (new StringReader (strSource));
builder = builderFactory.newDocument
Builder();
xmlDocIn = builder.parse (source);
strCommand = objEDO.GetXMLElementValue(
xmlDocIn, "Command");
strConnStr = objEDO.GetXMLElementValue(
xmlDocIn, "ConnEnc");
strParamStr = objEDO.GetXMLElementValue(
xmlDocIn, "ParamEnc");
strBytes = objEDO.GetXMLElementValue(
xmlDocIn, "Bytes");
oos = new ObjectOutputStream(respons
e.getOutpu
tStream())
;
if(strCommand.equals("GET"
)){
objCrs = objEDO.EdoGet(strConnStr,s
trParamStr
);
oos.writeObject(objCrs);
}
else if(strCommand.equals("SET"
) && strBytes.equals("no")) {
nResult = objEDO.EdoSet(strConnStr,s
trParamStr
);
Integer objnResult = new Integer(nResult);
oos.writeObject(objnResult
);
}
else if(strCommand.equals("SET"
) && !(strBytes.equals("no"))) {
byte[] bytes = strBytes.getBytes();
nResult = objEDO.EdoSet(strConnStr,s
trParamStr
,bytes);
Integer objnResult = new Integer(nResult);
oos.writeObject(objnResult
);
}
oos.flush();
oos.close();
%>
<html>
<body>
</body>
<head>
<meta http-equiv="pragma" content="no-cache" />
</head>
</html>
Does anyone have an idea???
thanks,
Ghost
Start Free Trial