Java client and form-based security

I wrote a Java client app (e.g. command line app) that connects to a web site via http to download (get) a file. Works good for most situations until I tried to get a file that is protected usign form based authentication. I can't figure out how I'm supposed to deal with this. I was able to deal with basic authentication easy enough. I've Googled for the info but can't find what I need.Anyone else ever do this? How's it done?

[441 byte] By [st.murphya] at [2007-10-1 21:51:20]
# 1
I think the answer might be here: http://forum.java.sun.com/thread.jspa?threadID=546542&tstart=0
st.murphya at 2007-7-13 7:54:35 > top of Java-index,Security,Other Security APIs, Tools, and Issues...