Re: Cookie Bug?

"William Saxton" <[email protected]>
Newsgroups gmane.comp.web.httpunit.devel
Message-ID <[email protected]>
Actually, maybe I'm now being too http-unit centric.

If my goal is to setup a servlet which downloads and parses information from
a website, but the only way to gain access to the website is to have the
servlet use cookie values from the user's browser then, perhaps, I should be
looking into servlet code that does this, not necessary httpunit code,
correct?

On 3/7/06, William Saxton <[email protected]> wrote:
>
> Ah, you're right.  All my worrying over cookies has made my
> troubleshooting cookie-centric.  The initial setting of CookieProperties
> fixed all but my last problem :)  This is definately a cookie issue.
>
> What do you do if someone already logged in?  For example, I'd hate to use
> my login name and password to grab information from a site when, since the
> use should have already logged into it, they should be able to retrieve it
> themselves without having to re-login.
>
> Can httpunit read a client's cookies that are already set?  The only thing
> I see in the javadocs is "ClientProperties" but it only checks to see if the
> client accepts cookies or not, not the actual cookies.
>
>
> On 3/1/06, Torsten Curdt <[email protected]> wrote:
> >
> >
> > On 01.03.2006, at 12:19, William Saxton wrote:
> >
> > > Thanks Torsten!  It's little things like that that screw us
> > > programmers up :)
> >
> > Yepp ;)
> >
> >
> > > My login was successful.  Now that I got past that, however, it
> > > doesn't look like the cookie I'm looking for is there:
> >
> > Are you sure you have to tinker with the cookie?
> > I've used it on a pretty FU site and after this
> >
> >    CookieProperties.setDomainMatchingStrict (false);
> >    CookieProperties.setPathMatchingStrict(false);
> >    CookieProperties.addCookieListener(new CookieListener() {
> >      public void cookieRejected( String pArg0, int pArg1, String
> > pArg2 ) {
> >          System.err.println (pArg0+pArg1+pArg2);
> >      }
> >    });
> >
> > Everything was working fine ...no rejected cookies.
> >
> > HTH
> > --
> > Torsten
> >
> >
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.