You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Randy Layman <ra...@aswethink.com> on 2001/03/06 14:25:46 UTC

RE: mod rewrite, RequestDispatcher and intercepting requests to t he server

	You might want to look into RequestInterceptors.  I don't know what
information about the request they receive, but I would imagine you could
get the headers.  Also, this is not a portable solution (don't expect JRun
to support Tomcat's RequestInterceptors).

	Randy

-----Original Message-----
From: Michael Tickle [mailto:michael.tickle@stud.umist.ac.uk]
Sent: Tuesday, March 06, 2001 8:53 AM
To: tomcat-user@jakarta.apache.org
Subject: mod rewrite, RequestDispatcher and intercepting requests to the
server


I am attempting to intercept all requests to a server so I can extract
information from the header.  I would then like to pass the request on to
the server for it to display the user the requested page.

I am led to believe that TomCat can not direct all requests to it on to a
servlet - is this correct?  Since I don't think this is possible I have
adapted a different strategy.
I have installed apache and using mod rewrite all requests are forwarded on
to my servlet.  The servlet the extracts the header information.  The
problem then is showing the user the requested page.  Ideally I would just
like to return the request to the server and let it deal with it. I am told
the closest to this is RequestDispatcher.  However RequestDispatcher seems
only to be able to use relative linking - this will not work for me as I
want to go from http://win2k:9090/servlet/myservlet?To=/index.html to
http://win2k/index.htm

Firstly is there a better way of doing what I am trying to do?

Secondly is there a similar feature to RequestDispatcher that can use full
URLs not relative URIs?

Thirdly has TomCat got any rewrite functionality (CF mod rewrite) since if I
can not pass the request back to the apache domain I will have to somehow
rewrite all the URLs in the tomcat domain.

Thanks for any help.

Mike

PS For future reference is this question more suited to the user or the
developer mailing list?

-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-

Michael Tickle
Computing Science
Dept. of Computation

ICQ 5252 8934
Mob: 0777 968 5548
Fax: 0870 705 8382


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