I am attempting to get information from an asp page on a separate server with java.
Here is what I am currently running for code:
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="java.util.*" %>
<%@ page import="java.text.*" %>
<%@ page import="java.net.*" %>
<%@ page import="java.io.*" %>
<%@ page import="com.nse.common.text.*" %>
<%@ page import="com.nse.common.admin.*" %>
<%@ page import="com.nse.common.util.*" %>
<%@ page import="com.nse.common.config.*" %>
<%@ page import="com.nse.ms.*" %>
<%
String targetUrl = "http://******/dash_auth/getmsuser.asp";
InputStream r2 = new URL(targetUrl).openStream();
%>
<html>
<head>
<title>get username</title>
</head>
<body>
Return Info = <%=r2%>
</body>
</html>
And this is what I am getting back
Return Info = sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@5fc9f555
I am hoping to get a username back and not this connection string. Any suggestions on how to get the actual output of my other page would be very helpful!