G
guyzdancin
I am trying to get a string from an active server page via an
HttpUrlConnection from a java application.
Following code does not work although a browser will display the the
string.
ACTIVE SERVER PAGE CODE
<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME="DbLog" Content="Log in Data for LPT Test">
</HEAD>
<BODY>
<%
Response.write ("Hello World")
%>
</BODY>
</HTML>
JAVA APPLICATION CODE
try{
connection = (HttpURLConnection)url.openConnection();
}catch(IOException iOE1){}
String key = null;
try{//get string key from web server
connection.setFollowRedirects(true);
BufferedReader in = new BufferedReader(
new InputStreamReader(connection.getInputStream() ) );
key = in.readLine();
System.out.println(key);
}catch(Exception e){}
Thanks in advance for your help
HttpUrlConnection from a java application.
Following code does not work although a browser will display the the
string.
ACTIVE SERVER PAGE CODE
<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME="DbLog" Content="Log in Data for LPT Test">
</HEAD>
<BODY>
<%
Response.write ("Hello World")
%>
</BODY>
</HTML>
JAVA APPLICATION CODE
try{
connection = (HttpURLConnection)url.openConnection();
}catch(IOException iOE1){}
String key = null;
try{//get string key from web server
connection.setFollowRedirects(true);
BufferedReader in = new BufferedReader(
new InputStreamReader(connection.getInputStream() ) );
key = in.readLine();
System.out.println(key);
}catch(Exception e){}
Thanks in advance for your help