Unfortuantly I did get something like that.  

HTTP/1.1 302
Date: Mon, 09 Jul 2001 20:56:22 GMT
Server: Apache/1.3.20 (Unix) mod_jk
Location: http://beru.cariboulake.com:0/servlet/Servlet2
Content-Length: 179
Connection: close

This sounds odd, but what if I swiched to ajp13?  Could that hopefully
change anything?

thanks

joe


On 09 Jul 2001 13:41:57 -0400, [EMAIL PROTECTED] wrote:
> 
> Try using telnet to connect to your servlet 1 and then see what is
> returned.
> You would enter something like this:
> 
> telnet beru.cariboulake.com 8765[ENTER]
> GET /servlet/Servlet1 HTTP/1.0[ENTER]
> [ENTER]
> 
> You should see the HTTP response from the servlet written to the console,
> eg:
> 
> HTTP/1.1 302 Object moved
> Date: Mon, 09 Jul 2001 17:39:13 GMT
> Location: /servlet/Servlet2
> 
> If you don't see something like this, there may be a clue as to what's not
> working.
> 
> - Fernando
> 
> 
> 
> I removed all the out.writes from Servlet1.  Infact all servlet1 does
> now is a response.sendReditect("/servlet/Servlet2");
> 
> I've still gottn the error.  Actually I did get an
> IlleagalStateException at first.  I had my redirect after I closded the
> outputstream, thats why I moved the redirect before the close.
> 
> However now as I mentioned earlier All servlet1 does is
> response.sendReditect("/servlet/Servlet2");
> 
> I'm still convinced that I have something configured wrong.
> 
> 
> joe
> 
> 
> On 09 Jul 2001 09:57:57 -0400, [EMAIL PROTECTED] wrote:
> >
> > Your source shows that you write HTML to the outputstream before you send
> > the redirect.
> > I'm surprised an exception -- like IllegalStateException -- isn't thrown.
> > Take out the
> > out.println() calls from servlet 1 and it should work.
> >
> > - Fernando
> >
> >
> >
> >
> 
> >                     Joseph D
> 
> >                     Toussaint               To:
> [EMAIL PROTECTED]
> 
> >                     <jdtoussa@caribo        cc:     (bcc: Fernando
> Salazar/CAM/Lotus)
> 
> >                     ulake.com>              Subject:     RE: problem with
> getPort()
> >
> 
> >                     07/09/2001 08:57
> 
> >                     AM
> 
> >                     Please respond
> 
> >                     to tomcat-user
> 
> >
> 
> >
> 
> >
> >
> >
> >
> > Ok now I'm convinced that I have something misconfigured.  I wrote 2
> > simple servlets
> >
> >
> >     http://beru.cariboulake.com:8765/servlet/Servlet1
> >     http://beru.cariboulake.com:8765/servlet/Servlet2
> >
> >
> > As you can see from the attached source all Servlet1 does is call
> > Servlet2.  I'm going to browse though some of the tomcat docs and see if
> > I can find what is mis-configured.
> >
> >
> > joe
> >
> >
> >
> >
> > On 09 Jul 2001 07:34:28 -0400, Randy Layman wrote:
> > >
> > >       That is strange, I use response.sendRedirect("otherPage.jsp")
> quite
> > > frequently.  The only thing that I have found strange about this method
> > is
> > > that you need to put a return on the next line - sending a redirect
> does
> > not
> > > stop the JSPs processing.
> > >
> > >       Randy
> > >
> > > > -----Original Message-----
> > > > From: Joseph D Toussaint [mailto:[EMAIL PROTECTED]]
> > > > Sent: Monday, July 09, 2001 8:24 AM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: RE: problem with getPort()
> > > >
> > > >
> > > > Believe me I agree with you about JRun (hence why were moving
> > > > to tomcat)
> > > > ;)
> > > >
> > > > The more I think about this I think this is a tomcat configuration
> > > > problem.  After playing around some more I simply tried a
> > > >
> > > >     response.sendRedirect(url);
> > > >
> > > > This brought me to a page that said "This page has moved to here".
> If
> > > > you click on here it goes to port 0 on my host.
> > > >
> > > > I think my next step is going to be to create 2 simple
> > > > servlets and try
> > > > and move between them.  Because that is where the error is occuring.
> > > > From a static HTML page I get to my first servlet fine but when that
> > > > servlet tries to move on to the next servlet I have problems.
> > > >
> > > >
> > > > joe
> > > >
> > > >
> > > > On 09 Jul 2001 07:00:37 -0400, Randy Layman wrote:
> > > > >
> > > > >       JRun is just about the last place I would look to
> > > > find the correct
> > > > > implementation of any method.
> > > > >
> > > > >       Tomcat implements the specification exactly (maybe
> > > > only with minor
> > > > > variances that we haven't found yet).  Since Tomcat is the
> reference
> > > > > implementation, there isn't really any choice in the
> > > > implantation, unlike
> > > > > JRun and the other servlet engines, which can choose what
> > > > they want to do.
> > > > >
> > > > >       Randy
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Joseph D Toussaint [mailto:[EMAIL PROTECTED]]
> > > > > > Sent: Sunday, July 08, 2001 6:03 PM
> > > > > > To: [EMAIL PROTECTED]
> > > > > > Subject: RE: problem with getPort()
> > > > > >
> > > > > >
> > > > > >
> > > > > > I'm trying to create a new URL to go to.  If I wanted to use the
> > > > > > request.getPort() method I'd have to also call getHostName() and
> > > > > > manually construct the URL.  It was my understanding that the
> > > > > > getRequestURL method did that for you.
> > > > > >
> > > > > > This code ran under JRun 3.x but for some reason wont  run
> > > > > > under tomcat.
> > > > > >
> > > > > >
> > > > > > Thanks
> > > > > >
> > > > > >
> > > > > > joe
> > > > > >
> > > > > >
> > > > > > On 03 Jul 2001 16:27:54 -0400, Randy Layman wrote:
> > > > > > >
> > > > > > >       Is there a reason that you aren't using request.getPort
> ()?
> > > > > > >
> > > > > > > > -----Original Message-----
> > > > > > > > From: Joseph D Toussaint [mailto:[EMAIL PROTECTED]]
> > > > > > > > Sent: Tuesday, July 03, 2001 4:38 PM
> > > > > > > > To: [EMAIL PROTECTED]
> > > > > > > > Subject: problem with getPort()
> > > > > > > >
> > > > > > > >
> > > > > > > > I'm trying to get the port off of a request object and it
> > > > > > is returning
> > > > > > > > port 0.
> > > > > > > >
> > > > > > > >
> > > > > > > > Here is how I'm getting the URL I came from.
> > > > > > > >
> > > > > > > >
> > > > > > > >         StringBuffer came_from =
> > > > HttpUtils.getRequestURL(request);
> > > > > > > >
> > > > > > > > While reconstructing a new URL
> > > > > > > >
> > > > > > > >     java.net.URL tmp_url   = new
> > > > > > java.net.URL(came_from.toString());
> > > > > > > >
> > > > > > > >
> > > > > > > > My servlet faild because I was using port 0.
> > > > > > > >
> > > > > > > > To test I printed out 'came_from' and it said port 0.
> > > > > > > >
> > > > > > > > I'm using Tomcat 3.2.2 with ajp12 configured to use
> > > > Apache 1.3.20
> > > > > > > >
> > > > > > > >
> > > > > > > > Thanks
> > > > > > > >
> > > > > > > >
> > > > > > > > joe
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > ##############################
> > > > > > > > # Joseph Toussaint           #
> > > > > > > > # Caribou Lake Software      #
> > > > > > > > # http://www.cariboulake.com #
> > > > > > > > # [EMAIL PROTECTED]   #
> > > > > > > > # 952-837-98029              #
> > > > > > > > ##############################
> > > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > ##############################
> > > > > > # Joseph Toussaint           #
> > > > > > # Caribou Lake Software      #
> > > > > > # http://www.cariboulake.com #
> > > > > > # [EMAIL PROTECTED]   #
> > > > > > # 952-837-98029              #
> > > > > > ##############################
> > > > > >
> > > >
> > > >
> > > >
> > > > --
> >
> >
> >
> >
> 
> 
> 
> --
> ##############################
> # Joseph Toussaint           #
> # Caribou Lake Software      #
> # http://www.cariboulake.com #
> # [EMAIL PROTECTED]   #
> # 952-837-98029              #
> ##############################
> 
> 
> 
> 
> 



-- 
##############################
# Joseph Toussaint           #
# Caribou Lake Software      #
# http://www.cariboulake.com #
# [EMAIL PROTECTED]   #
# 952-837-98029              #
##############################

Reply via email to