How to log into a web server?

C

Chris Smith

Jacob said:
I have got access (user/password) to a web server.
I can log into the server using a browser; What is
the correct approach (i.e. API) from a Java program?

See java.net.Authenticator. If you need more flexibility, then take a
look at the Jakarta Commons project called HttpClient.

--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 
J

Jacob

I have got access (user/password) to a web server.
I can log into the server using a browser; What is
the correct approach (i.e. API) from a Java program?

The server communicates using SOAP. Do I need the
soap.jar, mail.jar and activation.jar, or can I
communicate directly using Soap XML strings and
the build-in Java XML parser?

Thanks!
 
K

Kevin McMurtrie

I have got access (user/password) to a web server.
I can log into the server using a browser; What is
the correct approach (i.e. API) from a Java program?

The server communicates using SOAP. Do I need the
soap.jar, mail.jar and activation.jar, or can I
communicate directly using Soap XML strings and
the build-in Java XML parser?

Thanks!

There are many different authentication schemes, including MD5 digest,
basic (Base 64), a cookie from posting a form, and various forms
supplied in RMI calls. You'll need to know more about how it works.
 
A

Alex Hunsley

Jacob said:
I have got access (user/password) to a web server.
I can log into the server using a browser; What is
the correct approach (i.e. API) from a Java program?

As someone else said, you'll need to know the auth scheme.
It is most likely to be "basic" authentication, which is sent in the HTML
headers and is independent to the actual request itself.
In an nutshell, whatever you use for the HTTP requests should have a way for
you to set the basic authentication login/pwd in your request.

The server communicates using SOAP. Do I need the
soap.jar, mail.jar and activation.jar, or can I
communicate directly using Soap XML strings and
the build-in Java XML parser?

Not sure about that aspect of it...
alex
 
A

Andrew Thompson

....
Ah, I did not know of that feature. How did you generate that link?

A bit of nouse and a large dose of voodoo,
several black cockerels died.

....OK. You open the Google link and dispense
with the frames by opening the first post in a
new window, then you dispense with everything but..
<http://google.com/groups> as well as
?th='theTHidentifier'.

If it's a long thread it becomes more tricky,
and you have to go for the 'selm' parameter,
and add the anchor, or plough down to that
post individually.

As I said, a bit of figuring and a lot of luck.

...It was more interesting the first way though. ;-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top