TheObserver
Programmer
Hello. I’ve got a struts action class that connects to a webservice to pull over some data. I’m accessing the service with the following code in my java class:
[tt]
StringBuffer mySB = new StringBuffer();
String serviceAddress = "URL myURL = new URL(serviceAddress);
URLConnection conn = myURL.openConnection();
DataInputStream in = new DataInputStream (conn.getInputStream ());
BufferedReader d = new BufferedReader(new InputStreamReader(in));
while(d.ready())
{
mySB.append(d.readLine());
}
String ret = mySB.toString();
[/tt]
When I initially load up the JSP that uses this action class, the data doesn’t show up, and the server logs don’t show any errors. If I refresh the JSP, the data shows up.
Has anyone seen anything like this? I've been unable to find any information to help out. Thanks for your time.
[tt]
StringBuffer mySB = new StringBuffer();
String serviceAddress = "URL myURL = new URL(serviceAddress);
URLConnection conn = myURL.openConnection();
DataInputStream in = new DataInputStream (conn.getInputStream ());
BufferedReader d = new BufferedReader(new InputStreamReader(in));
while(d.ready())
{
mySB.append(d.readLine());
}
String ret = mySB.toString();
[/tt]
When I initially load up the JSP that uses this action class, the data doesn’t show up, and the server logs don’t show any errors. If I refresh the JSP, the data shows up.
Has anyone seen anything like this? I've been unable to find any information to help out. Thanks for your time.