users@glassfish.java.net

redirect hit message

From: <glassfish_at_javadesktop.org>
Date: Tue, 03 Jul 2007 15:41:26 PDT

I'm starting to get some error messages on my site, and I have a feeling it has to do with the redirection site that I have set up already. I have a simple filter application set up as the default web application for the server port. It forwards all traffic to the secure version of the site, complete with URL and query string. It is generating the following INFO message.

[#|2007-07-03T15:15:13.926-0700|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=18;_ThreadName=http
WorkerThread-80-2;|
redirect hit|#]

The filter is the basic one that NetBeans auto-generates, and then I altered the "doBeforeProcessing()" function, like so:

    private void doBeforeProcessing(RequestWrapper request, ResponseWrapper response)
    throws IOException, ServletException
    {
        if (debug) log("MoveFilter:DoBeforeProcessing");
        String url = request.getServletPath();
        if(request.getQueryString() != null) url += "?"+request.getQueryString();
        
        response.sendRedirect("https://secure-site.com/app"+url);
    }

Have I done something totally out of whack when setting it up this way? This seemed like the best way to quickly redirect traffic.

Thanks!
[Message sent by forum member 'bthoma' (bthoma)]

http://forums.java.net/jive/thread.jspa?messageID=225123