|
Here is a method from an applet using a URLConnection to get a serialized ArrayList from a servlet. Maybe something in here will help or confuse. Thanx, PLA private ArrayList getPlantCableSpecArrayList() throws IOException { URL dataUrl = null; try { String url = "http://HomeTelco.Com:8080/servlet/PlantTreeAppletLoadServlet"; System.out.println("URL is: " + url); dataUrl = new URL(url); } catch(MalformedURLException mfe) { System.out.println("Malformed URL Error: " + mfe); } System.out.println("About to get connection."); URLConnection connection = dataUrl.openConnection(); connection.setUseCaches(false); String authorizationHeader = getParameter("authorizationHeader"); if (authorizationHeader != null) { connection.setRequestProperty("Authorization", authorizationHeader); } System.out.println("Got connection and now trying io stream."); ObjectInputStream in = new ObjectInputStream(connection.getInputStream()); System.out.print("getInputStream done with bytes: " + in.available()); try { ArrayList al = (ArrayList)in.readObject(); return al; } catch(ClassNotFoundException cnfe) { System.out.println("Class not found error: " + cnfe); return null; } } -----Original Message----- From: java400-l-admin@midrange.com [mailto:java400-l-admin@midrange.com]On Behalf Of Mike Silvers Sent: Tuesday, October 01, 2002 1:07 PM To: java400-l@midrange.com Subject: Cleint side form POST Does anyone have an example of a client side POST response to a CGI server? I have data that needs to get posted to a server and I would like to automate the process. The POST is done to a secure server (SSL extension) and I have the connect to the secure server complete. I am running into an issue with using the URLConnection class. Thanks Mike _______________________________________________ This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) mailing list To post a message email: JAVA400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l or email: JAVA400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/java400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.