users
[Top] [All Lists]

RE: [cinjug-users] https login page: JDOM and XPath

To: "Jason Kretzer/STAR BASE Consulting Inc." <JKretzer@xxxxxxxxxxxxxxx>, <users@xxxxxxxxxx>
Subject: RE: [cinjug-users] https login page: JDOM and XPath
From: "Arnett, Matt" <Matt.Arnett@xxxxxxxxxx>
Date: Wed, 21 Apr 2004 13:45:54 -0400
Delivered-to: mailing list users@cinjug.org
Mailing-list: contact users-help@cinjug.org; run by ezmlm
Thread-index: AcQnxnF+NeIlqZ2JRq6d6wGtXjndTAAAOJjA
Thread-topic: [cinjug-users] https login page: JDOM and XPath

Just a side note, depending on what you need from the XML file, you may want to consider using JDOM (http://jdom.org/) to read in the file from a String or InputStream and then use the XPath classes in JDOM (http://jdom.org/docs/apidocs/index.html) to get at the elements or attributes you need.  It requires very little code to do this.  XPath is very simple but powerful and can save you a lot of tedious parsing of XML.

 

There is a good tutorial on XPath if you need it: http://www.w3schools.com/xpath/default.asp

-Matt

-----Original Message-----
From: Jason Kretzer/STAR BASE Consulting Inc. [mailto:JKretzer@xxxxxxxxxxxxxxx]
Sent
: Wednesday, April 21, 2004 1:30 PM
To: users@xxxxxxxxxx
Subject: [cinjug-users] https login page

 


Hello all,

Thanks to everyone for their replies to my last question.  I did end up using the following code for it.

URL url = "" URL("https://someWebSite.com/giveXML.jsp?someparam=paramOne");

InputStreamReader isr = new InputStreamReader(url.openStream());
BufferedReader br = new BufferedReader(isr);


Then read the xml file one line at a time.




For my current question, I need to have my login.html page be https so that the POSTing of the form will not be sent plain text to the servlet.  I am using WebSphere 5 for this.  

Anyone give me a start on this?

Thanks,

-Jason

<Prev in Thread] Current Thread [Next in Thread>