Thanks. Well, I made some progress. But I am having trouble passing parameters. I get a "null" back from the jsp.
import java.io.*;
import java.net.*;
public class GetAddress {
public static void main(
String[] args) throws Exception {
URL url = new URL("http://localhost:8081/testjsp/test.jsp");
URLConnection connection = url.openConnection();
connection.setDoOutput(true);
PrintWriter out = new PrintWriter( connection.getOutputStream());
out.println("address=\"1818+main+st\"");
out.close();
BufferedReader in = new BufferedReader(
new InputStreamReader(
connection.getInputStream()));
String inputLine;
System.out.println("read response:");
while ((inputLine = in.readLine()) != null)
System.out.println(inputLine);
in.close();
}
}
Here is the JSP running on
Tomcat <!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>
Test JSP Call</title>
</head>
<body>
<% String addr1 = request.getParameter("address1"); %>
address = <%= addr1 %>
</body>
</html>