Re: POST request to SSL/HTTPS URL
Arne VajhQj wrote:
Lew wrote:
Arne VajhQj wrote:
Dundonald wrote:
On Oct 6, 3:07 pm, Arne VajhQj <a...@vajhoej.dk> wrote:
Dundonald wrote:
Has anyone got a sample code or utility that will allow a POST
request
to be created to a SSL/HTTPS url?
I've spent a few hours googling and got solutions for HTTP and those
that I have found for HTTPs haven't worked.
Here are a small working example:
....
Thanks I'll give it a try. Instead of System.out.println(line); what's
the best way of sending the HTML response back to browser?
It is in servlet/JSP context ?
The examples do not indicate so. The answer for the OP may well be to
go with JEE instead of the JSE approach.
????
"send HTML back to browser" indicates that it is JSP or servlet
context.
And the JEE way is the same as the JSE way.
The OP's code and original post gave no hint that they were interested in
working with a browser; it was only in a followup that they mentioned using a
browser.
Using JEE, I have never had to manually create an HTTPS socket. The usual
approach, which is what I meant by the "JEE way", is to write a servlet and
mount it in a servlet container. Doing it outside the container, manually
establishing the connection, I call the "JSE way" - there is no use in the
OP's code snippets of any of the JEE SDK.
So, no, they are not the same.
--
Lew
--
Lew