You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by da...@bt.com on 2001/05/25 13:56:05 UTC

'Object Moved - 302' returned from https connection from a servle t

Hi,

	I'm trying to do a remote log on. I've tried a couple of sites,
including www.bt.com. I do the Https connect using a POST. The problem is
that I get back conn.getResponseMessage() = "Object moved" and 
conn.getResponseCode() = 302. Does anyone know if there is any way to get
round this. Is it something to do with sendRedirect and if so what is that ?

David

> -----Original Message-----
> From:	Steven Banks [SMTP:sbanks@silacom.com]
> Sent:	25 May 2001 12:03
> To:	'tomcat-user@jakarta.apache.org'
> Subject:	RE: HTTPS connections from servlet
> 
> We've managed to solve the problem. When I tried to create the URL object,
> a
> MalformedURLException was thrown complaining that https was an unknown
> protocol, even though we had set all of the relevant properties.
> 
> The solution appeared to be to generate a key using keytool. Once that was
> safely stored in the keystore the problems stopped. It was just a matter
> of
> trawling documentation a little longer basically.
> 
> Cheers,
> Steve
> 
> > -----Original Message-----
> > From: Rams [mailto:rameshn@cmcltd.com]
> > Sent: 25 May 2001 05:54
> > To: tomcat-user@jakarta.apache.org
> > Subject: RE: HTTPS connections from servlet
> > 
> > 
> > what exactly is ur problem?
> > u need to connect to a server securely from ur servlet, right?
> > or anything more?
> > lf u want to connect thru https to another server, no need 
> > for ur tomcat
> > to get ssl enabled.
> > 
> > elaborate ur problem.
> > 
> > rgrds
> > 
> > --Rams
> > 
> > 
> > -----Original Message-----
> > From: Steven Banks [mailto:sbanks@silacom.com]
> > Sent: Thursday, May 24, 2001 7:13 PM
> > To: 'tomcat-user@jakarta.apache.org'
> > Subject: HTTPS connections from servlet
> > 
> > 
> <snip>

Re: 'Object Moved - 302' returned from https connection from a servle t

Posted by Arnaud Dostes - NTI <ad...@nti-sa.com>.
response.sendRedirect returns a 302 HTTP code, with a Location parameter in
the headers representing the destination URL

----- Original Message -----
From: <da...@bt.com>
To: <to...@jakarta.apache.org>
Sent: Friday, May 25, 2001 1:56 PM
Subject: 'Object Moved - 302' returned from https connection from a servle t


> Hi,
>
> I'm trying to do a remote log on. I've tried a couple of sites,
> including www.bt.com. I do the Https connect using a POST. The problem is
> that I get back conn.getResponseMessage() = "Object moved" and
> conn.getResponseCode() = 302. Does anyone know if there is any way to get
> round this. Is it something to do with sendRedirect and if so what is that
?
>
> David
>
> > -----Original Message-----
> > From: Steven Banks [SMTP:sbanks@silacom.com]
> > Sent: 25 May 2001 12:03
> > To: 'tomcat-user@jakarta.apache.org'
> > Subject: RE: HTTPS connections from servlet
> >
> > We've managed to solve the problem. When I tried to create the URL
object,
> > a
> > MalformedURLException was thrown complaining that https was an unknown
> > protocol, even though we had set all of the relevant properties.
> >
> > The solution appeared to be to generate a key using keytool. Once that
was
> > safely stored in the keystore the problems stopped. It was just a matter
> > of
> > trawling documentation a little longer basically.
> >
> > Cheers,
> > Steve
> >
> > > -----Original Message-----
> > > From: Rams [mailto:rameshn@cmcltd.com]
> > > Sent: 25 May 2001 05:54
> > > To: tomcat-user@jakarta.apache.org
> > > Subject: RE: HTTPS connections from servlet
> > >
> > >
> > > what exactly is ur problem?
> > > u need to connect to a server securely from ur servlet, right?
> > > or anything more?
> > > lf u want to connect thru https to another server, no need
> > > for ur tomcat
> > > to get ssl enabled.
> > >
> > > elaborate ur problem.
> > >
> > > rgrds
> > >
> > > --Rams
> > >
> > >
> > > -----Original Message-----
> > > From: Steven Banks [mailto:sbanks@silacom.com]
> > > Sent: Thursday, May 24, 2001 7:13 PM
> > > To: 'tomcat-user@jakarta.apache.org'
> > > Subject: HTTPS connections from servlet
> > >
> > >
> > <snip>