tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lacerda, Wellington (AFIS)" <Wellington.Lace...@fao.org>
Subject RE: redirect to a static page from tomcat to apache
Date Tue, 02 Jan 2001 08:49:40 GMT
I'm not sure if it matters having Apache as webserver, but I believe you'll
have to use sendRedirect for this...essentially you are pointing to a
resource Tomcat can't locate inside the target context (because only Apache
knows about it). So I believe that's why you're getting this error message.

Of course paste the URL to the browser it will work, because Apache will be
serving it.

Wellington

		-----Original Message-----
		From:	Randy Paries [mailto:randy.paries@unitnet.com]
		Sent:	02 January 2001 04:37
		To:	COLE,GLENN (Non-HP-SantaClara,ex2)
		Cc:	tomcat-user@jakarta.apache.org
		Subject:	RE: redirect to a static page from tomcat to
apache

		Thats what I thought.

		but when I call::

		RequestDispatcher disp =
	
getServletConfig().getServletContext().getRequestDispatcher(URL);
		and URL = http://www.mydomain.com/consultant/index.html

		disp returns a null.

		I can cut and paste the URL from the error message to the
browser and it
		works ok.

		Randy




		-----Original Message-----
		From: COLE,GLENN (Non-HP-SantaClara,ex2)
[mailto:glenn_cole@non.hp.com]
		Sent: Monday, January 01, 2001 7:48 PM
		To: 'randy.paries@unitnet.com'
		Subject: RE: redirect to a static page from tomcat to apache


		Hi, Randy --

		Offhand, I'd suggest fully-qualifying the URL, e.g.,

		   String URL = "http://localhost/foo/x.html";

		My recollection (such as it is) is that Tomcat takes
		/name as relative to the current webapp; I *think* that
		fully-qualifying the URL will get around this.

		--Glenn


		-----Original Message-----
		From: Randy Paries [mailto:randy.paries@unitnet.com]
		Sent: Monday, January 01, 2001 4:25 PM
		To: tomcat-user@jakarta.apache.org
		Subject: redirect to a static page from tomcat to apache


		Hello,

		Is there anyway to do a forward from a servlet in tomcat to
a static page
		that apache only knows.
		ie.
		apache knows that /foo is /home/foo.

		but when the servlet executes and does the following(see
snippet below),
		Tomcat does not know where /foo is mapped to. If I set up a
context in
		server.xml it will work. But then for my app it gets more
complicated ,
		because x.html is a frame that calls two cgi programs. And
of course tomcat
		doesn't know about these guys.

		So what are my options?

		IS there way to set up a cgi-bin directory under tomcat?

		Thanks

		>From within a servlet.
	
---------------------------------------------------------------------
		String URL = "/foo/x.html";
		RequestDispatcher disp =
	
getServletConfig().getServletContext().getRequestDispatcher(jspURL);
		disp.forward(req,res);
	
---------------------------------------------------------------------


	
---------------------------------------------------------------------
		To unsubscribe, e-mail:
tomcat-user-unsubscribe@jakarta.apache.org
		For additional commands, email:
tomcat-user-help@jakarta.apache.org


	
---------------------------------------------------------------------
		To unsubscribe, e-mail:
tomcat-user-unsubscribe@jakarta.apache.org
		For additional commands, email:
tomcat-user-help@jakarta.apache.org

Mime
View raw message