[lug] Off topic: java form-based authentication in a client program

Sean Reifschneider jafo at tummy.com
Wed Aug 30 13:59:55 MDT 2006


On Wed, Aug 30, 2006 at 10:55:44AM -0600, Michael J. Hammel wrote:
>I've got a JBOSS application configured to use form-based
>authentication.  I need to write a Java client that can log into this.

In Python they have several "programmatic web browsers" such as
"mechanoid".  These are basically modules that act like a web browser, so
you would open a particular URL, then you can do things like get a list of
forms on the screen, get the list of fields within a form, fill in the ones
named "username" and "password", and click the submit button.

It handles things like the session cookies, etc.

So, maybe if you look for "programmatic web browser" you can find the right
thing?  Or look at mechanoid and see if there's some other terminology you
can look for in the Java world to find the right thing.  Or, worst case,
you can port mechanoid to Java.

Mechanoid is ok, IIRC.  Ka-Ping Yee has something similar as well:

   http://zesty.ca/python/scrape.html

I guess the other one I'm thinking of is called mechanize:

   http://wwwsearch.sourceforge.net/mechanize/

Mechanoid is at:

   http://cheeseshop.python.org/pypi/mechanoid

Sean
-- 
 What we see depends on mainly what we look for.
                 -- John Lubbock
Sean Reifschneider, Member of Technical Staff <jafo at tummy.com>
tummy.com, ltd. - Linux Consulting since 1995: Ask me about High Availability




More information about the LUG mailing list