Hi Ron,

This looks like another perfect opportunity to apply Orion's implementation
of  Servlet v2.3 filters.  See the "Clickstream" example under "Web-Apps"
at www.orionsupport.com.

I'm including some earlier correspondence with Huibert Aalbeers about its
use (from back in Jan 2001).  Thanks to Michael Cannon-Brookes who authored
the filter example and helped me a lot.

Note the importance of using the correct version of orion.jar to get the
Servlet v2.3 classes.

Hope this helps.

Jay Armstrong
[EMAIL PROTECTED]

*****************************
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
>
>
>

At 11:33 AM 3/6/01 -0000, you wrote:
>I have created the following session listener class which works but now I
>want to redirect the client to the start page of the application if they are
>trying to enter the application from another page.
>
>Easy peasy lemon squeezey in asp using global.asa but at a loss with java.
>
>Any help greatly appreciated.
>
>Code shown below.
>
>Ron Quartel.
>
>
>
>import java.util.*;
>import javax.servlet.*;
>import javax.servlet.http.*;
>
>public class SessionListener implements HttpSessionListener{
>
>    public SessionListener() {
>    }
>
>    public void sessionCreated(HttpSessionEvent hse) {
>        System.out.println("Session started");
>        //redirect to start page if not alread there i.e index.jsp.
>    }
>
>    public void sessionDestroyed(HttpSessionEvent hse) {}
>
>}
>
>


Reply via email to