(I wrote the clickstream demo btw)

It seems you want to implement mod_rewrite, of Apache fame? This doesn't
sound too hard to me, I might take a crack at it over the weekend, it would
be useful for myself anyway.

This is the easiest way to do it (off the top of my head):

Basically all you'll need is a configuration file (XML) that's loaded by a
listener.
Then a filter, mapped to whereever you might want to redirect (you could
always just map it to /)
Then in the filter, look at each URL, analyse if it matches any mappings
(possibly via a regexp) and redirect to the appropriate page.

Doesn't sound too hard to me. Look at Clickstream
(http://www.orionsupport.com/clickstream) for an example of a listener /
filter combination.

-mike

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Jay Armstrong
> Sent: Friday, January 05, 2001 6:16 AM
> To: Orion-Interest
> Subject: Re: Redirection -- suggest Clickstream demo
>
>
> Hi Huibert,
>
> My suggestion would be to use the Java Servlet API v2.3, building on the
> Clickstream demo at OrionSupport.
>
> Basically, I think you could define a listener, filters, and filter
> mappings in your web.xml file, and have the filter servlet(s) parse the
> request, lookup the target site in your database, and then forward the
> request to the target.
>
> A note on the use of the Clickstream demo: it appears that the FilterChain
> class of Servlet API v2.3 is only in the orion.jar of Orion
> v1.4.4, not the
> previous Orion versions.  I think you have to do an automatic update from
> the Orion startup command to get this orion.jar (that is, you cannot
> currently download v1.4.4 directly).
>
> Also, when I tried the Clickstream demo and put web.xml in a .war, put the
> .war in a .ear, and identified the application in server.xml as being in
> that .ear file, then Orion seemed to remove the necessary web.xml elements
> (<listener>, <filter>, and <filter-mapping>).  When I identified the
> application as a directory (instead of a .ear file) in server.xml, it
> worked fine.  I submitted a Bugzilla report (#236) at
> http://www.orionserver.com.
>
> You could still do the filtering with previous versions of the servlet API
> and Orion, but using Servlet API v2.3 would be a really cool way -- and
> (IMHO) the way it should be done.
>
> Any thoughts on this, especially experience with Clickstream demo?
>
> Jay Armstrong
> [EMAIL PROTECTED]
>
> At 11:07 AM 1/4/01 -0600, you wrote:
> >Hi everyone,
> >
> >Since it seems that the list is alive and well, although with very
> >little traffic, I would like to ask a question which has been bothering
> >me for a while.
> >
> >I am trying to do what I would define as dynamic redirection. What that
> >means is that if someone writes an URL like http://myserver/name, I
> >would like to look for "name" in a database and redirect the user to
> >some other URL. This would allow me to avoid modifying manually the
> >configuration file every time a mapping is added,removed or modified.
> >
> >Is this possible? Any suggestions?
> >
> >Thanks in advance and Happy New Year!
> >
> >Huibert Aalbers
> >
> >
> >
>
>


Reply via email to