//# 9 errors, 376 messages
//#
/*
    //#RedirectServlet.java:1:1: class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
 * Licensed to the Apache Software Foundation (ASF) under one or more
 *  contributor license agreements.  The ASF licenses this file to You
 * under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.  For additional information regarding
 * copyright in this work, please see the NOTICE file in the top level
 * directory of this distribution.
 */

package org.apache.roller.weblogger.ui.rendering.velocity.deprecated;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.roller.weblogger.business.WebloggerFactory;
import org.apache.roller.weblogger.config.WebloggerRuntimeConfig;
import org.apache.roller.weblogger.util.URLUtilities;


/**
 * Redirect pre-3.0 urls to new location using 301 redirects.
 *
 * @web.servlet name="RedirectServlet" load-on-startup="9"
 * @web.servlet-mapping url-pattern="/language/*"
 * @web.servlet-mapping url-pattern="/comments/*"
 * @web.servlet-mapping url-pattern="/resources/*"
 * @web.servlet-mapping url-pattern="/rsd/*"
 * @web.servlet-mapping url-pattern="/flavor/*"
 * @web.servlet-mapping url-pattern="/rss/*"
 * @web.servlet-mapping url-pattern="/atom/*"
 * @web.servlet-mapping url-pattern="/page/*"
 * @web.servlet-mapping url-pattern="/search/*"
 * @web.servlet-mapping url-pattern="/xmlrpc/*"
 * @web.servlet-mapping url-pattern="/editor/*"
 * @web.servlet-mapping url-pattern="/admin/*"
 */
public class RedirectServlet extends HttpServlet {
    //#RedirectServlet.java:52: method: void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet.org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet()
    //#input(void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet()): this
    //#RedirectServlet.java:52: end of method: void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet.org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet()
    
    private static Log log = LogFactory.getLog(RedirectServlet.class);
    //#RedirectServlet.java:54: method: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet.org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet__static_init
    //#RedirectServlet.java:54: Warning: method not available
    //#    -- call on Log org.apache.commons.logging.LogFactory:getLog(Class)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet__static_init
    //#    unanalyzed callee: Log org.apache.commons.logging.LogFactory:getLog(Class)
    //#output(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet__static_init): __Descendant_Table[org/apache/roller/weblogger/ui/rendering/velocity/deprecated/RedirectServlet]
    //#output(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet__static_init): __Dispatch_Table.doGet(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V
    //#output(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet__static_init): __Dispatch_Table.figureAdminRedirect(Ljavax/servlet/http/HttpServletRequest;)Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet__static_init): __Dispatch_Table.figureCommentsRedirect(Ljavax/servlet/http/HttpServletRequest;)Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet__static_init): __Dispatch_Table.figureEditorRedirect(Ljavax/servlet/http/HttpServletRequest;)Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet__static_init): __Dispatch_Table.figureFeedRedirect(Ljavax/servlet/http/HttpServletRequest;)Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet__static_init): __Dispatch_Table.figureLanguageRedirect(Ljavax/servlet/http/HttpServletRequest;)Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet__static_init): __Dispatch_Table.figurePageRedirect(Ljavax/servlet/http/HttpServletRequest;)Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet__static_init): __Dispatch_Table.figureResourceRedirect(Ljavax/servlet/http/HttpServletRequest;)Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet__static_init): __Dispatch_Table.figureRsdRedirect(Ljavax/servlet/http/HttpServletRequest;)Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet__static_init): __Dispatch_Table.figureSearchRedirect(Ljavax/servlet/http/HttpServletRequest;)Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet__static_init): __Dispatch_Table.figureXmlrpcRedirect(Ljavax/servlet/http/HttpServletRequest;)Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet__static_init): log
    //#post(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet__static_init): __Descendant_Table[org/apache/roller/weblogger/ui/rendering/velocity/deprecated/RedirectServlet] == &__Dispatch_Table
    //#post(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet__static_init): __Dispatch_Table.doGet(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V == &doGet
    //#post(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet__static_init): __Dispatch_Table.figureAdminRedirect(Ljavax/servlet/http/HttpServletRequest;)Ljava/lang/String; == &figureAdminRedirect
    //#post(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet__static_init): __Dispatch_Table.figureCommentsRedirect(Ljavax/servlet/http/HttpServletRequest;)Ljava/lang/String; == &figureCommentsRedirect
    //#post(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet__static_init): __Dispatch_Table.figureEditorRedirect(Ljavax/servlet/http/HttpServletRequest;)Ljava/lang/String; == &figureEditorRedirect
    //#post(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet__static_init): __Dispatch_Table.figureFeedRedirect(Ljavax/servlet/http/HttpServletRequest;)Ljava/lang/String; == &figureFeedRedirect
    //#post(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet__static_init): __Dispatch_Table.figureLanguageRedirect(Ljavax/servlet/http/HttpServletRequest;)Ljava/lang/String; == &figureLanguageRedirect
    //#post(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet__static_init): __Dispatch_Table.figurePageRedirect(Ljavax/servlet/http/HttpServletRequest;)Ljava/lang/String; == &figurePageRedirect
    //#post(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet__static_init): __Dispatch_Table.figureResourceRedirect(Ljavax/servlet/http/HttpServletRequest;)Ljava/lang/String; == &figureResourceRedirect
    //#post(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet__static_init): __Dispatch_Table.figureRsdRedirect(Ljavax/servlet/http/HttpServletRequest;)Ljava/lang/String; == &figureRsdRedirect
    //#post(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet__static_init): __Dispatch_Table.figureSearchRedirect(Ljavax/servlet/http/HttpServletRequest;)Ljava/lang/String; == &figureSearchRedirect
    //#post(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet__static_init): __Dispatch_Table.figureXmlrpcRedirect(Ljavax/servlet/http/HttpServletRequest;)Ljava/lang/String; == &figureXmlrpcRedirect
    //#post(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet__static_init): init'ed(log)
    //#RedirectServlet.java:54: end of method: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet.org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet__static_init
    
    public static final String LanguageServlet = "language";
    public static final String CommentsServlet = "comments";
    public static final String ResourceServlet = "resources";
    public static final String RsdServlet = "rsd";
    public static final String FlavorServlet = "flavor";
    public static final String RssServlet = "rss";
    public static final String AtomServlet = "atom";
    public static final String PageServlet = "page";
    public static final String SearchServlet = "search";
    public static final String XmlrpcServlet = "xmlrpc";
    public static final String EditorUI = "editor";
    public static final String AdminUI = "admin";
    
    
    /**
     * Handle GET requests.
     *
     * All we are doing is calculating the new url for the given resource and
     * sending a 301 redirect to it's new location.
     */
    public void doGet(HttpServletRequest request, HttpServletResponse response) 
            throws ServletException, IOException {
        
        String redirectUrl = null;
    //#RedirectServlet.java:79: method: void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet.doGet(HttpServletRequest, HttpServletResponse)
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): "."._tainted
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): ".feed.entries."._tainted
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): ".resource."._tainted
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): ".roller-ui."._tainted
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): ".rsd"._tainted
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): ".search"._tainted
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): "Location"._tainted
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): "Weblog"._tainted
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): "category."._tainted
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): "date."._tainted
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): "entry."._tainted
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): "not a weblog feed request, "._tainted
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): "not a weblog page request, "._tainted
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): "page."._tainted
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): "parsing url "._tainted
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): "path info = "._tainted
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): "redirecting to "._tainted
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): "rss"._tainted
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): "uri = "._tainted
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): log
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldCommentsRequest.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldCommentsRequest]
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldCommentsRequest.__Dispatch_Table.getWeblogAnchor()Ljava/lang/String;
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldCommentsRequest.__Dispatch_Table.getWeblogHandle()Ljava/lang/String;
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldCommentsRequest.log
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldFeedRequest.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldFeedRequest]
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldFeedRequest.__Dispatch_Table.getFlavor()Ljava/lang/String;
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldFeedRequest.__Dispatch_Table.getWeblogCategory()Ljava/lang/String;
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldFeedRequest.__Dispatch_Table.getWeblogHandle()Ljava/lang/String;
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldFeedRequest.__Dispatch_Table.isExcerpts()Z
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldFeedRequest.feedServlets
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldFeedRequest.mLogger
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldPageRequest.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldPageRequest]
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldPageRequest.__Dispatch_Table.getWeblogAnchor()Ljava/lang/String;
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldPageRequest.__Dispatch_Table.getWeblogCategory()Ljava/lang/String;
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldPageRequest.__Dispatch_Table.getWeblogDate()Ljava/lang/String;
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldPageRequest.__Dispatch_Table.getWeblogHandle()Ljava/lang/String;
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldPageRequest.__Dispatch_Table.getWeblogPage()Ljava/lang/String;
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldPageRequest.mLogger
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): request
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): response
    //#input(void doGet(HttpServletRequest, HttpServletResponse)): this
    //#pre[1] (void doGet(HttpServletRequest, HttpServletResponse)): log != null
    //#pre[6] (void doGet(HttpServletRequest, HttpServletResponse)): request != null
    //#pre[7] (void doGet(HttpServletRequest, HttpServletResponse)): response != null
    //#pre[2] (void doGet(HttpServletRequest, HttpServletResponse)): (soft) org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldCommentsRequest.log != null
    //#pre[3] (void doGet(HttpServletRequest, HttpServletResponse)): (soft) org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldFeedRequest.feedServlets != null
    //#pre[4] (void doGet(HttpServletRequest, HttpServletResponse)): (soft) org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldFeedRequest.mLogger != null
    //#pre[5] (void doGet(HttpServletRequest, HttpServletResponse)): (soft) org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldPageRequest.mLogger != null
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getRelativeContextURL
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:javax.servlet.http.HttpServletRequest:getPathInfo
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.String:substring
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.String:split
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:org.apache.roller.weblogger.business.Weblogger:getUrlStrategy
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:org.apache.roller.weblogger.business.URLStrategy:getXmlrpcURL
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.util.HashMap
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:javax.servlet.http.HttpServletRequest:getParameter
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.String:trim
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.String:length
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.util.Map:put
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:org.apache.roller.weblogger.util.URLUtilities:getQueryString
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:javax.servlet.http.HttpServletRequest:getRequestURL
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:org.apache.commons.logging.Log:debug
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:javax.servlet.http.HttpServletRequest:getServletPath
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.util.Set:contains
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.Boolean:valueOf
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.Boolean:booleanValue
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.String:equals
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.Exception
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getProperty
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:org.apache.roller.weblogger.util.URLUtilities:encode
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:org.apache.commons.lang.StringUtils:isNumeric
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.StringBuffer
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.StringBuffer:append
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.String:startsWith
    //#unanalyzed(void doGet(HttpServletRequest, HttpServletResponse)): Effects-of-calling:java.lang.StringBuffer:toString
    //#test_vector(void doGet(HttpServletRequest, HttpServletResponse)): java.lang.String:endsWith(...)@89: {0}, {1}
    //#test_vector(void doGet(HttpServletRequest, HttpServletResponse)): java.lang.String:equals(...)@101: {0}, {1}
    //#test_vector(void doGet(HttpServletRequest, HttpServletResponse)): java.lang.String:equals(...)@105: {0}, {1}
    //#test_vector(void doGet(HttpServletRequest, HttpServletResponse)): java.lang.String:equals(...)@109: {0}, {1}
    //#test_vector(void doGet(HttpServletRequest, HttpServletResponse)): java.lang.String:equals(...)@113: {0}, {1}
    //#test_vector(void doGet(HttpServletRequest, HttpServletResponse)): java.lang.String:equals(...)@117: {0}, {1}
    //#test_vector(void doGet(HttpServletRequest, HttpServletResponse)): java.lang.String:equals(...)@121: {0}, {1}
    //#test_vector(void doGet(HttpServletRequest, HttpServletResponse)): java.lang.String:equals(...)@125: {0}, {1}
    //#test_vector(void doGet(HttpServletRequest, HttpServletResponse)): java.lang.String:equals(...)@129: {0}, {1}
    //#test_vector(void doGet(HttpServletRequest, HttpServletResponse)): java.lang.String:equals(...)@133: {0}, {1}
    //#test_vector(void doGet(HttpServletRequest, HttpServletResponse)): java.lang.String:equals(...)@137: {0}, {1}
    //#test_vector(void doGet(HttpServletRequest, HttpServletResponse)): java.lang.String:equals(...)@141: {0}, {1}
    //#test_vector(void doGet(HttpServletRequest, HttpServletResponse)): java.lang.String:equals(...)@145: {0}, {1}
    //#test_vector(void doGet(HttpServletRequest, HttpServletResponse)): java.lang.String:length(...)@83: {0,1}, {2..4_294_967_295}
    //#test_vector(void doGet(HttpServletRequest, HttpServletResponse)): javax.servlet.http.HttpServletRequest:getServletPath(...)@82: Addr_Set{null}, Inverse{null}
        
        // figure out what servlet the request was destined for and parse
        String servlet = request.getServletPath();
        if(servlet != null && servlet.trim().length() > 1) {
            
            // strip off the leading slash
            servlet = servlet.substring(1);
            
            // strip off trailing slash if needed
            if(servlet.endsWith("/")) {
                servlet = servlet.substring(0, servlet.length() - 1);
            }
        } else {
            // bad request, 404
        }
        
        log.debug("uri = "+request.getRequestURI());
    //#RedirectServlet.java:96: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:debug(Object)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: void doGet(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:debug(Object)
        log.debug("path info = "+request.getPathInfo());
    //#RedirectServlet.java:97: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:debug(Object)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: void doGet(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:debug(Object)
        
        
        // language servlet
        if(LanguageServlet.equals(servlet)) {
            redirectUrl = figureLanguageRedirect(request);
            
        // comments servlet
        } else if(CommentsServlet.equals(servlet)) {
            redirectUrl = figureCommentsRedirect(request);
            
        // resource servlet
        } else if(ResourceServlet.equals(servlet)) {
            redirectUrl = figureResourceRedirect(request);
            
        // rsd servlet
        } else if(RsdServlet.equals(servlet)) {
            redirectUrl = figureRsdRedirect(request);
            
        // flavor servlet
        } else if(FlavorServlet.equals(servlet)) {
            redirectUrl = figureFeedRedirect(request);
            
        // rss servlet
        } else if(RssServlet.equals(servlet)) {
            redirectUrl = figureFeedRedirect(request);
            
        // atom servlet
        } else if(AtomServlet.equals(servlet)) {
            redirectUrl = figureFeedRedirect(request);
            
        // page servlet
        } else if(PageServlet.equals(servlet)) {
            redirectUrl = figurePageRedirect(request);
            
        // search servlet
        } else if(SearchServlet.equals(servlet)) {
            redirectUrl = figureSearchRedirect(request);
            
        // xmlrpc servlet
        } else if(XmlrpcServlet.equals(servlet)) {
            redirectUrl = figureXmlrpcRedirect(request);
            
        // editor UI
        } else if(EditorUI.equals(servlet)) {
            redirectUrl = figureEditorRedirect(request);
            
        // admin UI
        } else if(AdminUI.equals(servlet)) {
            redirectUrl = figureAdminRedirect(request);
        }
        
        if(redirectUrl != null) {
            log.debug("redirecting to "+redirectUrl);
    //#RedirectServlet.java:150: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:debug(Object)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: void doGet(HttpServletRequest, HttpServletResponse)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:debug(Object)
            
            // send an HTTP 301 response
            response.setStatus(response.SC_MOVED_PERMANENTLY);
            response.setHeader("Location", redirectUrl);
    //#RedirectServlet.java:154: ?cross-site scripting potential
    //#    redirectUrl._tainted == 0
    //#    severity: LOW
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: void doGet(HttpServletRequest, HttpServletResponse)
    //#    basic block: bb_30
    //#    assertion: redirectUrl._tainted == 0
    //#    VN: redirectUrl._tainted
    //#    Expected: {0}
    //#    Bad: {1}
    //#    Attribs:  Int  Exp in +/-1000  Exp singleton  Bad singleton  Bad overlaps +/-1000  Bad > Exp
        } else {
            // no redirect, send 404
            response.sendError(response.SC_NOT_FOUND);
        }
    }
    //#RedirectServlet.java:159: end of method: void org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet.doGet(HttpServletRequest, HttpServletResponse)
    
    
    // language servlet has no new equivalent, so just redirect to weblog homepage
    private String figureLanguageRedirect(HttpServletRequest request) {
        
        String newUrl = WebloggerRuntimeConfig.getRelativeContextURL();
    //#RedirectServlet.java:165: method: String org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet.figureLanguageRedirect(HttpServletRequest)
    //#RedirectServlet.java:165: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getRelativeContextURL()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figureLanguageRedirect(HttpServletRequest)
    //#    unanalyzed callee: String org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getRelativeContextURL()
    //#input(String figureLanguageRedirect(HttpServletRequest)): "."._tainted
    //#input(String figureLanguageRedirect(HttpServletRequest)): request
    //#output(String figureLanguageRedirect(HttpServletRequest)): java.lang.StringBuilder:toString(...)._tainted
    //#output(String figureLanguageRedirect(HttpServletRequest)): return_value
    //#new obj(String figureLanguageRedirect(HttpServletRequest)): java.lang.StringBuilder:toString(...)
    //#pre[1] (String figureLanguageRedirect(HttpServletRequest)): request != null
    //#post(String figureLanguageRedirect(HttpServletRequest)): java.lang.StringBuilder:toString(...)._tainted == 0
    //#post(String figureLanguageRedirect(HttpServletRequest)): return_value == One-of{null, &java.lang.StringBuilder:toString(...)}
    //#post(String figureLanguageRedirect(HttpServletRequest)): return_value in Addr_Set{null,&java.lang.StringBuilder:toString(...)}
    //#test_vector(String figureLanguageRedirect(HttpServletRequest)): javax.servlet.http.HttpServletRequest:getPathInfo(...)@167: Inverse{null}, Addr_Set{null}
        
        String pathInfo = request.getPathInfo();
        if(pathInfo == null) {
            return null;
        } else {
            pathInfo = pathInfo.substring(1);
        }
        
        String[] pathElements = pathInfo.split("/", 2);
        return newUrl+"/"+pathElements[0]+"/";
    //#RedirectServlet.java:175: ?use of default init
    //#    init'ed(pathElements.length)
    //#    severity: LOW
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figureLanguageRedirect(HttpServletRequest)
    //#    basic block: bb_3
    //#    assertion: init'ed(pathElements.length)
    //#    VN: undefined
    //#    Expected: {-Inf..+Inf}
    //#    Bad: {Invalid}
    //#    Attribs:  Int  Bad only invalid
    //#RedirectServlet.java:175: ?use of default init
    //#    init'ed(pathElements[0])
    //#    severity: SUPPRESSED
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figureLanguageRedirect(HttpServletRequest)
    //#    basic block: bb_3
    //#    assertion: init'ed(pathElements[0])
    //#    VN: undefined
    //#    Expected: Univ-VN-Set
    //#    Bad: {Invalid}
    //#    Attribs:  Ptr  Bad only invalid
    //#RedirectServlet.java:175: end of method: String org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet.figureLanguageRedirect(HttpServletRequest)
    }
    
    
    // old comments were a form of permalink, so redirect to new permalinks
    private String figureCommentsRedirect(HttpServletRequest request) {
        
        OldCommentsRequest commentsRequest = null;
    //#RedirectServlet.java:182: method: String org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet.figureCommentsRedirect(HttpServletRequest)
    //#RedirectServlet.java:182: Warning: unused assignment
    //#    unused assignment into commentsRequest
    //#    severity: SUPPRESSED
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figureCommentsRedirect(HttpServletRequest)
    //#    Attribs:  Uncertain
    //#input(String figureCommentsRedirect(HttpServletRequest)): "."._tainted
    //#input(String figureCommentsRedirect(HttpServletRequest)): "entry."._tainted
    //#input(String figureCommentsRedirect(HttpServletRequest)): "not a weblog page request, "._tainted
    //#input(String figureCommentsRedirect(HttpServletRequest)): "parsing url "._tainted
    //#input(String figureCommentsRedirect(HttpServletRequest)): org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldCommentsRequest.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldCommentsRequest]
    //#input(String figureCommentsRedirect(HttpServletRequest)): org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldCommentsRequest.__Dispatch_Table.getWeblogAnchor()Ljava/lang/String;
    //#input(String figureCommentsRedirect(HttpServletRequest)): org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldCommentsRequest.__Dispatch_Table.getWeblogHandle()Ljava/lang/String;
    //#input(String figureCommentsRedirect(HttpServletRequest)): org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldCommentsRequest.log
    //#input(String figureCommentsRedirect(HttpServletRequest)): request
    //#output(String figureCommentsRedirect(HttpServletRequest)): java.lang.StringBuffer:toString(...)._tainted
    //#output(String figureCommentsRedirect(HttpServletRequest)): return_value
    //#new obj(String figureCommentsRedirect(HttpServletRequest)): java.lang.StringBuffer:toString(...)
    //#pre[1] (String figureCommentsRedirect(HttpServletRequest)): (soft) org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldCommentsRequest.log != null
    //#pre[2] (String figureCommentsRedirect(HttpServletRequest)): (soft) request != null
    //#post(String figureCommentsRedirect(HttpServletRequest)): init'ed(java.lang.StringBuffer:toString(...)._tainted)
    //#post(String figureCommentsRedirect(HttpServletRequest)): return_value in Addr_Set{null,&java.lang.StringBuffer:toString(...)}
    //#unanalyzed(String figureCommentsRedirect(HttpServletRequest)): Effects-of-calling:java.lang.String:length
    //#unanalyzed(String figureCommentsRedirect(HttpServletRequest)): Effects-of-calling:org.apache.commons.lang.StringUtils:isNumeric
    //#unanalyzed(String figureCommentsRedirect(HttpServletRequest)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(String figureCommentsRedirect(HttpServletRequest)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(String figureCommentsRedirect(HttpServletRequest)): Effects-of-calling:javax.servlet.http.HttpServletRequest:getRequestURL
    //#unanalyzed(String figureCommentsRedirect(HttpServletRequest)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(String figureCommentsRedirect(HttpServletRequest)): Effects-of-calling:org.apache.commons.logging.Log:debug
    //#unanalyzed(String figureCommentsRedirect(HttpServletRequest)): Effects-of-calling:javax.servlet.http.HttpServletRequest:getServletPath
    //#unanalyzed(String figureCommentsRedirect(HttpServletRequest)): Effects-of-calling:javax.servlet.http.HttpServletRequest:getPathInfo
    //#unanalyzed(String figureCommentsRedirect(HttpServletRequest)): Effects-of-calling:java.lang.String:substring
    //#unanalyzed(String figureCommentsRedirect(HttpServletRequest)): Effects-of-calling:java.lang.String:equals
    //#unanalyzed(String figureCommentsRedirect(HttpServletRequest)): Effects-of-calling:java.lang.String:trim
    //#unanalyzed(String figureCommentsRedirect(HttpServletRequest)): Effects-of-calling:java.lang.String:split
    //#unanalyzed(String figureCommentsRedirect(HttpServletRequest)): Effects-of-calling:javax.servlet.http.HttpServletRequest:getParameter
    //#unanalyzed(String figureCommentsRedirect(HttpServletRequest)): Effects-of-calling:java.lang.Exception
        try {
            // get parsed version of old page request
            commentsRequest = new OldCommentsRequest(request);
        } catch (Exception ex) {
            return null;
        }
        
        StringBuffer url = new StringBuffer();
        
        url.append(WebloggerRuntimeConfig.getRelativeContextURL());
    //#RedirectServlet.java:192: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getRelativeContextURL()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figureCommentsRedirect(HttpServletRequest)
    //#    unanalyzed callee: String org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getRelativeContextURL()
        url.append("/").append(commentsRequest.getWeblogHandle()).append("/");
        
        if(commentsRequest.getWeblogAnchor() != null) {
            
            // permalink url
            url.append("entry/").append(URLUtilities.encode(commentsRequest.getWeblogAnchor()));
    //#RedirectServlet.java:198: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.util.URLUtilities:encode(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figureCommentsRedirect(HttpServletRequest)
    //#    unanalyzed callee: String org.apache.roller.weblogger.util.URLUtilities:encode(String)
            
        } else {
            return null;
        }
        
        return url.toString();
    //#RedirectServlet.java:204: end of method: String org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet.figureCommentsRedirect(HttpServletRequest)
    }
    
    
    // redirect to new weblog resource location
    private String figureResourceRedirect(HttpServletRequest request) {
        
        String newUrl = WebloggerRuntimeConfig.getRelativeContextURL();
    //#RedirectServlet.java:211: method: String org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet.figureResourceRedirect(HttpServletRequest)
    //#RedirectServlet.java:211: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getRelativeContextURL()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figureResourceRedirect(HttpServletRequest)
    //#    unanalyzed callee: String org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getRelativeContextURL()
    //#input(String figureResourceRedirect(HttpServletRequest)): "."._tainted
    //#input(String figureResourceRedirect(HttpServletRequest)): ".resource."._tainted
    //#input(String figureResourceRedirect(HttpServletRequest)): request
    //#output(String figureResourceRedirect(HttpServletRequest)): java.lang.StringBuilder:toString(...)._tainted
    //#output(String figureResourceRedirect(HttpServletRequest)): return_value
    //#new obj(String figureResourceRedirect(HttpServletRequest)): java.lang.StringBuilder:toString(...)
    //#pre[1] (String figureResourceRedirect(HttpServletRequest)): request != null
    //#post(String figureResourceRedirect(HttpServletRequest)): java.lang.StringBuilder:toString(...)._tainted == 0
    //#post(String figureResourceRedirect(HttpServletRequest)): return_value == null
    //#test_vector(String figureResourceRedirect(HttpServletRequest)): javax.servlet.http.HttpServletRequest:getPathInfo(...)@213: Inverse{null}, Addr_Set{null}
        
        String pathInfo = request.getPathInfo();
        if(pathInfo == null) {
            return null;
        } else {
            pathInfo = pathInfo.substring(1);
        }
        
        String[] pathElements = pathInfo.split("/", 2);
        if(pathElements.length != 2) {
    //#RedirectServlet.java:221: ?use of default init
    //#    init'ed(pathElements.length)
    //#    severity: LOW
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figureResourceRedirect(HttpServletRequest)
    //#    basic block: bb_3
    //#    assertion: init'ed(pathElements.length)
    //#    VN: undefined
    //#    Expected: {-Inf..+Inf}
    //#    Bad: {Invalid}
    //#    Attribs:  Int  Bad only invalid
    //#RedirectServlet.java:221: Warning: test always goes same way
    //#    test predetermined because pathElements.length == 0
    //#    severity: LOW
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figureResourceRedirect(HttpServletRequest)
    //#    from bb: bb_3
    //#    live edge: bb_3-->bb_4
    //#    tested vn: undefined - 2
    //#    tested vn values: {-2}
            return null;
        }
        
        return newUrl+"/"+pathElements[0]+"/resource/"+pathElements[1];
    //#RedirectServlet.java:225: Warning: dead code
    //#    dead code here because pathElements.length == 0
    //#    severity: LOW
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figureResourceRedirect(HttpServletRequest)
    //#    dead bb: bb_5
    //#RedirectServlet.java:225: end of method: String org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet.figureResourceRedirect(HttpServletRequest)
    }
    
    
    // redirect to new weblog rsd location
    private String figureRsdRedirect(HttpServletRequest request) {
        
        String newUrl = WebloggerRuntimeConfig.getRelativeContextURL();
    //#RedirectServlet.java:232: method: String org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet.figureRsdRedirect(HttpServletRequest)
    //#RedirectServlet.java:232: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getRelativeContextURL()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figureRsdRedirect(HttpServletRequest)
    //#    unanalyzed callee: String org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getRelativeContextURL()
    //#input(String figureRsdRedirect(HttpServletRequest)): "."._tainted
    //#input(String figureRsdRedirect(HttpServletRequest)): ".rsd"._tainted
    //#input(String figureRsdRedirect(HttpServletRequest)): request
    //#output(String figureRsdRedirect(HttpServletRequest)): java.lang.StringBuilder:toString(...)._tainted
    //#output(String figureRsdRedirect(HttpServletRequest)): return_value
    //#new obj(String figureRsdRedirect(HttpServletRequest)): java.lang.StringBuilder:toString(...)
    //#pre[1] (String figureRsdRedirect(HttpServletRequest)): request != null
    //#post(String figureRsdRedirect(HttpServletRequest)): java.lang.StringBuilder:toString(...)._tainted == 0
    //#post(String figureRsdRedirect(HttpServletRequest)): return_value == One-of{null, &java.lang.StringBuilder:toString(...)}
    //#post(String figureRsdRedirect(HttpServletRequest)): return_value in Addr_Set{null,&java.lang.StringBuilder:toString(...)}
    //#test_vector(String figureRsdRedirect(HttpServletRequest)): javax.servlet.http.HttpServletRequest:getPathInfo(...)@234: Inverse{null}, Addr_Set{null}
        
        String pathInfo = request.getPathInfo();
        if(pathInfo == null) {
            return null;
        } else {
            pathInfo = pathInfo.substring(1);
        }
        
        String[] pathElements = pathInfo.split("/", 2);
        return newUrl+"/"+pathElements[0]+"/rsd";
    //#RedirectServlet.java:242: ?use of default init
    //#    init'ed(pathElements.length)
    //#    severity: LOW
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figureRsdRedirect(HttpServletRequest)
    //#    basic block: bb_3
    //#    assertion: init'ed(pathElements.length)
    //#    VN: undefined
    //#    Expected: {-Inf..+Inf}
    //#    Bad: {Invalid}
    //#    Attribs:  Int  Bad only invalid
    //#RedirectServlet.java:242: ?use of default init
    //#    init'ed(pathElements[0])
    //#    severity: SUPPRESSED
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figureRsdRedirect(HttpServletRequest)
    //#    basic block: bb_3
    //#    assertion: init'ed(pathElements[0])
    //#    VN: undefined
    //#    Expected: Univ-VN-Set
    //#    Bad: {Invalid}
    //#    Attribs:  Ptr  Bad only invalid
    //#RedirectServlet.java:242: end of method: String org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet.figureRsdRedirect(HttpServletRequest)
    }
    
    
    // redirect to new weblog feed location
    private String figureFeedRedirect(HttpServletRequest request) {
        
        OldFeedRequest feedRequest = null;
    //#RedirectServlet.java:249: method: String org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet.figureFeedRedirect(HttpServletRequest)
    //#RedirectServlet.java:249: Warning: unused assignment
    //#    unused assignment into feedRequest
    //#    severity: SUPPRESSED
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figureFeedRedirect(HttpServletRequest)
    //#    Attribs:  Uncertain
    //#input(String figureFeedRedirect(HttpServletRequest)): "."._tainted
    //#input(String figureFeedRedirect(HttpServletRequest)): ".feed.entries."._tainted
    //#input(String figureFeedRedirect(HttpServletRequest)): "not a weblog feed request, "._tainted
    //#input(String figureFeedRedirect(HttpServletRequest)): "parsing url "._tainted
    //#input(String figureFeedRedirect(HttpServletRequest)): "rss"._tainted
    //#input(String figureFeedRedirect(HttpServletRequest)): org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldFeedRequest.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldFeedRequest]
    //#input(String figureFeedRedirect(HttpServletRequest)): org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldFeedRequest.__Dispatch_Table.getFlavor()Ljava/lang/String;
    //#input(String figureFeedRedirect(HttpServletRequest)): org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldFeedRequest.__Dispatch_Table.getWeblogCategory()Ljava/lang/String;
    //#input(String figureFeedRedirect(HttpServletRequest)): org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldFeedRequest.__Dispatch_Table.getWeblogHandle()Ljava/lang/String;
    //#input(String figureFeedRedirect(HttpServletRequest)): org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldFeedRequest.__Dispatch_Table.isExcerpts()Z
    //#input(String figureFeedRedirect(HttpServletRequest)): org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldFeedRequest.feedServlets
    //#input(String figureFeedRedirect(HttpServletRequest)): org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldFeedRequest.mLogger
    //#input(String figureFeedRedirect(HttpServletRequest)): request
    //#output(String figureFeedRedirect(HttpServletRequest)): java.lang.StringBuilder:toString(...)._tainted
    //#output(String figureFeedRedirect(HttpServletRequest)): return_value
    //#new obj(String figureFeedRedirect(HttpServletRequest)): java.lang.StringBuilder:toString(...)
    //#pre[1] (String figureFeedRedirect(HttpServletRequest)): (soft) org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldFeedRequest.feedServlets != null
    //#pre[2] (String figureFeedRedirect(HttpServletRequest)): (soft) org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldFeedRequest.mLogger != null
    //#pre[3] (String figureFeedRedirect(HttpServletRequest)): (soft) request != null
    //#post(String figureFeedRedirect(HttpServletRequest)): init'ed(java.lang.StringBuilder:toString(...)._tainted)
    //#post(String figureFeedRedirect(HttpServletRequest)): return_value in Addr_Set{null,&java.lang.StringBuilder:toString(...)}
    //#unanalyzed(String figureFeedRedirect(HttpServletRequest)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(String figureFeedRedirect(HttpServletRequest)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(String figureFeedRedirect(HttpServletRequest)): Effects-of-calling:javax.servlet.http.HttpServletRequest:getRequestURL
    //#unanalyzed(String figureFeedRedirect(HttpServletRequest)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(String figureFeedRedirect(HttpServletRequest)): Effects-of-calling:org.apache.commons.logging.Log:debug
    //#unanalyzed(String figureFeedRedirect(HttpServletRequest)): Effects-of-calling:javax.servlet.http.HttpServletRequest:getServletPath
    //#unanalyzed(String figureFeedRedirect(HttpServletRequest)): Effects-of-calling:javax.servlet.http.HttpServletRequest:getPathInfo
    //#unanalyzed(String figureFeedRedirect(HttpServletRequest)): Effects-of-calling:java.lang.String:substring
    //#unanalyzed(String figureFeedRedirect(HttpServletRequest)): Effects-of-calling:java.util.Set:contains
    //#unanalyzed(String figureFeedRedirect(HttpServletRequest)): Effects-of-calling:java.lang.String:trim
    //#unanalyzed(String figureFeedRedirect(HttpServletRequest)): Effects-of-calling:java.lang.String:length
    //#unanalyzed(String figureFeedRedirect(HttpServletRequest)): Effects-of-calling:java.lang.String:split
    //#unanalyzed(String figureFeedRedirect(HttpServletRequest)): Effects-of-calling:javax.servlet.http.HttpServletRequest:getParameter
    //#unanalyzed(String figureFeedRedirect(HttpServletRequest)): Effects-of-calling:java.lang.Boolean:valueOf
    //#unanalyzed(String figureFeedRedirect(HttpServletRequest)): Effects-of-calling:java.lang.Boolean:booleanValue
    //#unanalyzed(String figureFeedRedirect(HttpServletRequest)): Effects-of-calling:java.lang.String:equals
    //#unanalyzed(String figureFeedRedirect(HttpServletRequest)): Effects-of-calling:java.lang.Exception
        try {
            // get parsed version of old feed request
            feedRequest = new OldFeedRequest(request);
        } catch (Exception ex) {
            return null;
        }
        
        String weblog = feedRequest.getWeblogHandle();
    //#RedirectServlet.java:257: ?precondition failure
    //#    org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldFeedRequest.getWeblogHandle: init'ed(this.weblogHandle)
    //#    severity: SUPPRESSED
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figureFeedRedirect(HttpServletRequest)
    //#    basic block: bb_4
    //#    assertion: init'ed(org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldFeedRequest.Param_0.weblogHandle)
    //#    callee: String org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldFeedRequest.getWeblogHandle()
    //#    callee assertion: init'ed(this.weblogHandle)
    //#    callee file: OldFeedRequest.java
    //#    callee precondition index: [2]
    //#    callee srcpos: 154
    //#    VN: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldFeedRequest.Param_0.weblogHandle
    //#    Expected: Univ-VN-Set
    //#    Bad: {Invalid}
    //#    Attribs:  Ptr  Bad only invalid
        if(weblog == null) {
    //#RedirectServlet.java:258: Warning: test always goes same way
    //#    test predetermined because weblog == null
    //#    severity: LOW
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figureFeedRedirect(HttpServletRequest)
    //#    from bb: bb_4
    //#    live edge: bb_4-->bb_5
    //#    tested vn: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.OldFeedRequest.Param_0.weblogHandle == null
    //#    tested vn values: {1}
            // must be site-wide feed
            weblog = WebloggerRuntimeConfig.getProperty("site.frontpage.weblog.handle");
    //#RedirectServlet.java:260: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getProperty(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figureFeedRedirect(HttpServletRequest)
    //#    unanalyzed callee: String org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getProperty(String)
        }
        
        String newUrl = WebloggerRuntimeConfig.getRelativeContextURL();
    //#RedirectServlet.java:263: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getRelativeContextURL()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figureFeedRedirect(HttpServletRequest)
    //#    unanalyzed callee: String org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getRelativeContextURL()
        newUrl += "/"+weblog+"/feed/entries/"+feedRequest.getFlavor();
        
        Map params = new HashMap();
        if(feedRequest.getWeblogCategory() != null) {
            params.put("cat", URLUtilities.encode(feedRequest.getWeblogCategory()));
    //#RedirectServlet.java:268: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.util.URLUtilities:encode(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figureFeedRedirect(HttpServletRequest)
    //#    unanalyzed callee: String org.apache.roller.weblogger.util.URLUtilities:encode(String)
        }
        if(feedRequest.isExcerpts()) {
            params.put("excerpts", "true");
        }
        
        return newUrl + URLUtilities.getQueryString(params);
    //#RedirectServlet.java:274: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.util.URLUtilities:getQueryString(Map)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figureFeedRedirect(HttpServletRequest)
    //#    unanalyzed callee: String org.apache.roller.weblogger.util.URLUtilities:getQueryString(Map)
    //#RedirectServlet.java:274: end of method: String org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet.figureFeedRedirect(HttpServletRequest)
    }
    
    
    // redirect to new weblog page location
    private String figurePageRedirect(HttpServletRequest request) {
        
        OldPageRequest pageRequest = null;
    //#RedirectServlet.java:281: method: String org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet.figurePageRedirect(HttpServletRequest)
    //#RedirectServlet.java:281: Warning: unused assignment
    //#    unused assignment into pageRequest
    //#    severity: SUPPRESSED
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figurePageRedirect(HttpServletRequest)
    //#    Attribs:  Uncertain
    //#input(String figurePageRedirect(HttpServletRequest)): "."._tainted
    //#input(String figurePageRedirect(HttpServletRequest)): "Weblog"._tainted
    //#input(String figurePageRedirect(HttpServletRequest)): "category."._tainted
    //#input(String figurePageRedirect(HttpServletRequest)): "date."._tainted
    //#input(String figurePageRedirect(HttpServletRequest)): "entry."._tainted
    //#input(String figurePageRedirect(HttpServletRequest)): "not a weblog page request, "._tainted
    //#input(String figurePageRedirect(HttpServletRequest)): "page."._tainted
    //#input(String figurePageRedirect(HttpServletRequest)): "parsing url "._tainted
    //#input(String figurePageRedirect(HttpServletRequest)): org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldPageRequest.__Descendant_Table[org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldPageRequest]
    //#input(String figurePageRedirect(HttpServletRequest)): org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldPageRequest.__Dispatch_Table.getWeblogAnchor()Ljava/lang/String;
    //#input(String figurePageRedirect(HttpServletRequest)): org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldPageRequest.__Dispatch_Table.getWeblogCategory()Ljava/lang/String;
    //#input(String figurePageRedirect(HttpServletRequest)): org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldPageRequest.__Dispatch_Table.getWeblogDate()Ljava/lang/String;
    //#input(String figurePageRedirect(HttpServletRequest)): org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldPageRequest.__Dispatch_Table.getWeblogHandle()Ljava/lang/String;
    //#input(String figurePageRedirect(HttpServletRequest)): org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldPageRequest.__Dispatch_Table.getWeblogPage()Ljava/lang/String;
    //#input(String figurePageRedirect(HttpServletRequest)): org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldPageRequest.mLogger
    //#input(String figurePageRedirect(HttpServletRequest)): request
    //#output(String figurePageRedirect(HttpServletRequest)): java.lang.StringBuilder:toString(...)._tainted
    //#output(String figurePageRedirect(HttpServletRequest)): return_value
    //#new obj(String figurePageRedirect(HttpServletRequest)): java.lang.StringBuilder:toString(...)
    //#pre[1] (String figurePageRedirect(HttpServletRequest)): (soft) org/apache/roller/weblogger/ui/rendering/velocity/deprecated/OldPageRequest.mLogger != null
    //#pre[2] (String figurePageRedirect(HttpServletRequest)): (soft) request != null
    //#post(String figurePageRedirect(HttpServletRequest)): init'ed(java.lang.StringBuilder:toString(...)._tainted)
    //#post(String figurePageRedirect(HttpServletRequest)): return_value in Addr_Set{null,&java.lang.StringBuilder:toString(...)}
    //#unanalyzed(String figurePageRedirect(HttpServletRequest)): Effects-of-calling:java.lang.String:length
    //#unanalyzed(String figurePageRedirect(HttpServletRequest)): Effects-of-calling:org.apache.commons.lang.StringUtils:isNumeric
    //#unanalyzed(String figurePageRedirect(HttpServletRequest)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(String figurePageRedirect(HttpServletRequest)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(String figurePageRedirect(HttpServletRequest)): Effects-of-calling:javax.servlet.http.HttpServletRequest:getRequestURL
    //#unanalyzed(String figurePageRedirect(HttpServletRequest)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(String figurePageRedirect(HttpServletRequest)): Effects-of-calling:org.apache.commons.logging.Log:debug
    //#unanalyzed(String figurePageRedirect(HttpServletRequest)): Effects-of-calling:javax.servlet.http.HttpServletRequest:getServletPath
    //#unanalyzed(String figurePageRedirect(HttpServletRequest)): Effects-of-calling:javax.servlet.http.HttpServletRequest:getPathInfo
    //#unanalyzed(String figurePageRedirect(HttpServletRequest)): Effects-of-calling:java.lang.String:substring
    //#unanalyzed(String figurePageRedirect(HttpServletRequest)): Effects-of-calling:java.lang.String:equals
    //#unanalyzed(String figurePageRedirect(HttpServletRequest)): Effects-of-calling:java.lang.String:trim
    //#unanalyzed(String figurePageRedirect(HttpServletRequest)): Effects-of-calling:java.lang.String:split
    //#unanalyzed(String figurePageRedirect(HttpServletRequest)): Effects-of-calling:javax.servlet.http.HttpServletRequest:getParameter
    //#unanalyzed(String figurePageRedirect(HttpServletRequest)): Effects-of-calling:java.lang.Exception
    //#test_vector(String figurePageRedirect(HttpServletRequest)): java.lang.String:startsWith(...)@319: {0}, {1}
        try {
            // get parsed version of old page request
            pageRequest = new OldPageRequest(request);
        } catch (Exception ex) {
            return null;
        }
        
        StringBuffer url = new StringBuffer();
        Map params = new HashMap();
        
        url.append(WebloggerRuntimeConfig.getRelativeContextURL());
    //#RedirectServlet.java:292: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getRelativeContextURL()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figurePageRedirect(HttpServletRequest)
    //#    unanalyzed callee: String org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getRelativeContextURL()
        url.append("/").append(pageRequest.getWeblogHandle()).append("/");
        
        if(pageRequest.getWeblogPage() != null && 
    //#RedirectServlet.java:295: Warning: test always goes same way
    //#    test predetermined because getWeblogPage(...) == null
    //#    severity: LOW
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figurePageRedirect(HttpServletRequest)
    //#    from bb: bb_4
    //#    live edge: bb_4-->bb_12
    //#    tested vn: this.weblogPage == null
    //#    tested vn values: {1}
    //#RedirectServlet.java:295: Warning: dead code
    //#    dead code here because getWeblogPage(...) == null
    //#    severity: LOW
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figurePageRedirect(HttpServletRequest)
    //#    dead bb: bb_5
                !"Weblog".equals(pageRequest.getWeblogPage())) {
            
            // a custom page name, so they get the new /weblog/page/name url
            url.append("page/").append(pageRequest.getWeblogPage());
    //#RedirectServlet.java:299: Warning: dead code continues
    //#    dead code continues
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figurePageRedirect(HttpServletRequest)
    //#    dead bb: bb_6
            
            // we also allow for params on custom pages
            if(pageRequest.getWeblogDate() != null) {
                params.put("date", pageRequest.getWeblogDate());
    //#RedirectServlet.java:303: Warning: dead code continues
    //#    dead code continues
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figurePageRedirect(HttpServletRequest)
    //#    dead bb: bb_7
            }
            if(pageRequest.getWeblogCategory() != null) {
    //#RedirectServlet.java:305: Warning: dead code continues
    //#    dead code continues
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figurePageRedirect(HttpServletRequest)
    //#    dead bb: bb_8
                params.put("cat", URLUtilities.encode(pageRequest.getWeblogCategory()));
    //#RedirectServlet.java:306: Warning: dead code continues
    //#    dead code continues
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figurePageRedirect(HttpServletRequest)
    //#    dead bb: bb_9
            }
            if(pageRequest.getWeblogAnchor() != null) {
    //#RedirectServlet.java:308: Warning: dead code continues
    //#    dead code continues
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figurePageRedirect(HttpServletRequest)
    //#    dead bb: bb_10
                params.put("entry", URLUtilities.encode(pageRequest.getWeblogAnchor()));
    //#RedirectServlet.java:309: Warning: dead code continues
    //#    dead code continues
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figurePageRedirect(HttpServletRequest)
    //#    dead bb: bb_11
            }
            
        } else if(pageRequest.getWeblogAnchor() != null) {
            
            // permalink url
            url.append("entry/").append(URLUtilities.encode(pageRequest.getWeblogAnchor()));
    //#RedirectServlet.java:315: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.util.URLUtilities:encode(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figurePageRedirect(HttpServletRequest)
    //#    unanalyzed callee: String org.apache.roller.weblogger.util.URLUtilities:encode(String)
            
        } else if(pageRequest.getWeblogCategory() != null && pageRequest.getWeblogDate() == null) {
    //#RedirectServlet.java:317: Warning: test always goes same way
    //#    test predetermined because getWeblogDate(...) == null
    //#    severity: LOW
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figurePageRedirect(HttpServletRequest)
    //#    from bb: bb_15
    //#    live edge: bb_15-->bb_16
    //#    tested vn: this.weblogDate == null
    //#    tested vn values: {1}
            String cat = pageRequest.getWeblogCategory();
            if(pageRequest.getWeblogCategory().startsWith("/")) {
                cat = pageRequest.getWeblogCategory().substring(1);
            }
            
            url.append("category/").append(URLUtilities.encode(cat));
    //#RedirectServlet.java:323: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.util.URLUtilities:encode(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figurePageRedirect(HttpServletRequest)
    //#    unanalyzed callee: String org.apache.roller.weblogger.util.URLUtilities:encode(String)
            
        } else if(pageRequest.getWeblogDate() != null && pageRequest.getWeblogCategory() == null) {
    //#RedirectServlet.java:325: Warning: test always goes same way
    //#    test predetermined because getWeblogDate(...) == null
    //#    severity: LOW
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figurePageRedirect(HttpServletRequest)
    //#    from bb: bb_19
    //#    live edge: bb_19-->bb_22
    //#    tested vn: this.weblogDate == null
    //#    tested vn values: {1}
    //#RedirectServlet.java:325: Warning: dead code
    //#    dead code here because getWeblogDate(...) == null
    //#    severity: LOW
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figurePageRedirect(HttpServletRequest)
    //#    dead bb: bb_20
            url.append("date/").append(pageRequest.getWeblogDate());  
    //#RedirectServlet.java:326: Warning: dead code continues
    //#    dead code continues
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figurePageRedirect(HttpServletRequest)
    //#    dead bb: bb_21
            
        } else {
            if(pageRequest.getWeblogDate() != null) {
    //#RedirectServlet.java:329: Warning: test always goes same way
    //#    test predetermined because getWeblogDate(...) == null
    //#    severity: LOW
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figurePageRedirect(HttpServletRequest)
    //#    from bb: bb_22
    //#    live edge: bb_22-->bb_24
    //#    tested vn: this.weblogDate == null
    //#    tested vn values: {1}
                params.put("date", pageRequest.getWeblogDate());
    //#RedirectServlet.java:330: Warning: dead code
    //#    dead code here because getWeblogDate(...) == null
    //#    severity: LOW
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figurePageRedirect(HttpServletRequest)
    //#    dead bb: bb_23
            }
            if(pageRequest.getWeblogCategory() != null) {
    //#RedirectServlet.java:332: Warning: test always goes same way
    //#    test predetermined because getWeblogCategory(...) == null
    //#    severity: LOW
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figurePageRedirect(HttpServletRequest)
    //#    from bb: bb_24
    //#    live edge: bb_24-->bb_26
    //#    tested vn: this.weblogCategory == null
    //#    tested vn values: {1}
                params.put("cat", URLUtilities.encode(pageRequest.getWeblogCategory()));
    //#RedirectServlet.java:333: Warning: dead code
    //#    dead code here because getWeblogCategory(...) == null
    //#    severity: LOW
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figurePageRedirect(HttpServletRequest)
    //#    dead bb: bb_25
            }
        }
        
        return url.toString() + URLUtilities.getQueryString(params);
    //#RedirectServlet.java:337: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.util.URLUtilities:getQueryString(Map)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figurePageRedirect(HttpServletRequest)
    //#    unanalyzed callee: String org.apache.roller.weblogger.util.URLUtilities:getQueryString(Map)
    //#RedirectServlet.java:337: end of method: String org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet.figurePageRedirect(HttpServletRequest)
    }
    
    
    // redirect to new search servlet
    private String figureSearchRedirect(HttpServletRequest request) {
        
        String newUrl = WebloggerRuntimeConfig.getRelativeContextURL();
    //#RedirectServlet.java:344: method: String org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet.figureSearchRedirect(HttpServletRequest)
    //#RedirectServlet.java:344: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getRelativeContextURL()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figureSearchRedirect(HttpServletRequest)
    //#    unanalyzed callee: String org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getRelativeContextURL()
    //#input(String figureSearchRedirect(HttpServletRequest)): "."._tainted
    //#input(String figureSearchRedirect(HttpServletRequest)): ".search"._tainted
    //#input(String figureSearchRedirect(HttpServletRequest)): request
    //#output(String figureSearchRedirect(HttpServletRequest)): java.lang.StringBuilder:toString(...)._tainted
    //#output(String figureSearchRedirect(HttpServletRequest)): return_value
    //#new obj(String figureSearchRedirect(HttpServletRequest)): java.lang.StringBuilder:toString(...)
    //#pre[1] (String figureSearchRedirect(HttpServletRequest)): request != null
    //#presumption(String figureSearchRedirect(HttpServletRequest)): javax.servlet.http.HttpServletRequest:getParameter(...)@358 != null
    //#presumption(String figureSearchRedirect(HttpServletRequest)): javax.servlet.http.HttpServletRequest:getParameter(...)@363 != null
    //#post(String figureSearchRedirect(HttpServletRequest)): init'ed(java.lang.StringBuilder:toString(...)._tainted)
    //#post(String figureSearchRedirect(HttpServletRequest)): return_value in Addr_Set{null,&java.lang.StringBuilder:toString(...)}
    //#test_vector(String figureSearchRedirect(HttpServletRequest)): java.lang.String:length(...)@358: {0}, {1..4_294_967_295}
    //#test_vector(String figureSearchRedirect(HttpServletRequest)): java.lang.String:length(...)@363: {0}, {1..4_294_967_295}
    //#test_vector(String figureSearchRedirect(HttpServletRequest)): javax.servlet.http.HttpServletRequest:getParameter(...)@358: Addr_Set{null}, Inverse{null}
    //#test_vector(String figureSearchRedirect(HttpServletRequest)): javax.servlet.http.HttpServletRequest:getParameter(...)@363: Addr_Set{null}, Inverse{null}
    //#test_vector(String figureSearchRedirect(HttpServletRequest)): javax.servlet.http.HttpServletRequest:getPathInfo(...)@346: Inverse{null}, Addr_Set{null}
        
        String pathInfo = request.getPathInfo();
        if(pathInfo == null) {
            return null;
        } else {
            pathInfo = pathInfo.substring(1);
        }
        
        String[] pathElements = pathInfo.split("/", 2);
        newUrl += "/"+pathElements[0]+"/search";
    //#RedirectServlet.java:354: ?use of default init
    //#    init'ed(pathElements.length)
    //#    severity: LOW
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figureSearchRedirect(HttpServletRequest)
    //#    basic block: bb_3
    //#    assertion: init'ed(pathElements.length)
    //#    VN: undefined
    //#    Expected: {-Inf..+Inf}
    //#    Bad: {Invalid}
    //#    Attribs:  Int  Bad only invalid
    //#RedirectServlet.java:354: ?use of default init
    //#    init'ed(pathElements[0])
    //#    severity: SUPPRESSED
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figureSearchRedirect(HttpServletRequest)
    //#    basic block: bb_3
    //#    assertion: init'ed(pathElements[0])
    //#    VN: undefined
    //#    Expected: Univ-VN-Set
    //#    Bad: {Invalid}
    //#    Attribs:  Ptr  Bad only invalid
        
        // query params
        Map params = new HashMap();
        if(request.getParameter("q") != null && 
                request.getParameter("q").trim().length() > 0) {
            
            params.put("q", request.getParameter("q"));
            
            if(request.getParameter("c") != null && 
                request.getParameter("c").trim().length() > 0) {
                params.put("cat", request.getParameter("c"));
            }
        }
        
        return newUrl + URLUtilities.getQueryString(params);
    //#RedirectServlet.java:369: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.util.URLUtilities:getQueryString(Map)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figureSearchRedirect(HttpServletRequest)
    //#    unanalyzed callee: String org.apache.roller.weblogger.util.URLUtilities:getQueryString(Map)
    //#RedirectServlet.java:369: end of method: String org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet.figureSearchRedirect(HttpServletRequest)
    }
    
    
    // redirect to new xmlrpc location
    private String figureXmlrpcRedirect(HttpServletRequest request) {
        
        return WebloggerFactory.getWeblogger().getUrlStrategy().getXmlrpcURL(true);
    //#RedirectServlet.java:376: method: String org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet.figureXmlrpcRedirect(HttpServletRequest)
    //#RedirectServlet.java:376: Warning: method not available
    //#    -- call on Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figureXmlrpcRedirect(HttpServletRequest)
    //#    unanalyzed callee: Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#RedirectServlet.java:376: Warning: method not available
    //#    -- call on URLStrategy org.apache.roller.weblogger.business.Weblogger:getUrlStrategy()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figureXmlrpcRedirect(HttpServletRequest)
    //#    unanalyzed callee: URLStrategy org.apache.roller.weblogger.business.Weblogger:getUrlStrategy()
    //#RedirectServlet.java:376: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.business.URLStrategy:getXmlrpcURL(bool)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figureXmlrpcRedirect(HttpServletRequest)
    //#    unanalyzed callee: String org.apache.roller.weblogger.business.URLStrategy:getXmlrpcURL(bool)
    //#output(String figureXmlrpcRedirect(HttpServletRequest)): return_value
    //#presumption(String figureXmlrpcRedirect(HttpServletRequest)): org.apache.roller.weblogger.business.Weblogger:getUrlStrategy(...)@376 != null
    //#presumption(String figureXmlrpcRedirect(HttpServletRequest)): org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger(...)@376 != null
    //#post(String figureXmlrpcRedirect(HttpServletRequest)): init'ed(return_value)
    //#RedirectServlet.java:376: end of method: String org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet.figureXmlrpcRedirect(HttpServletRequest)
    }
    
    
    // redirect to new editor UI location
    private String figureEditorRedirect(HttpServletRequest request) {
        
        return WebloggerRuntimeConfig.getRelativeContextURL()+"/roller-ui/";
    //#RedirectServlet.java:383: method: String org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet.figureEditorRedirect(HttpServletRequest)
    //#RedirectServlet.java:383: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getRelativeContextURL()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figureEditorRedirect(HttpServletRequest)
    //#    unanalyzed callee: String org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getRelativeContextURL()
    //#input(String figureEditorRedirect(HttpServletRequest)): ".roller-ui."._tainted
    //#output(String figureEditorRedirect(HttpServletRequest)): java.lang.StringBuilder:toString(...)._tainted
    //#output(String figureEditorRedirect(HttpServletRequest)): return_value
    //#new obj(String figureEditorRedirect(HttpServletRequest)): java.lang.StringBuilder:toString(...)
    //#post(String figureEditorRedirect(HttpServletRequest)): java.lang.StringBuilder:toString(...)._tainted == 0
    //#post(String figureEditorRedirect(HttpServletRequest)): return_value == &java.lang.StringBuilder:toString(...)
    //#RedirectServlet.java:383: end of method: String org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet.figureEditorRedirect(HttpServletRequest)
    }
    
    
    // redirect to new admin UI location
    private String figureAdminRedirect(HttpServletRequest request) {
        
        return WebloggerRuntimeConfig.getRelativeContextURL()+"/roller-ui/";
    //#RedirectServlet.java:390: method: String org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet.figureAdminRedirect(HttpServletRequest)
    //#RedirectServlet.java:390: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getRelativeContextURL()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
    //#    method: String figureAdminRedirect(HttpServletRequest)
    //#    unanalyzed callee: String org.apache.roller.weblogger.config.WebloggerRuntimeConfig:getRelativeContextURL()
    //#input(String figureAdminRedirect(HttpServletRequest)): ".roller-ui."._tainted
    //#output(String figureAdminRedirect(HttpServletRequest)): java.lang.StringBuilder:toString(...)._tainted
    //#output(String figureAdminRedirect(HttpServletRequest)): return_value
    //#new obj(String figureAdminRedirect(HttpServletRequest)): java.lang.StringBuilder:toString(...)
    //#post(String figureAdminRedirect(HttpServletRequest)): java.lang.StringBuilder:toString(...)._tainted == 0
    //#post(String figureAdminRedirect(HttpServletRequest)): return_value == &java.lang.StringBuilder:toString(...)
    //#RedirectServlet.java:390: end of method: String org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet.figureAdminRedirect(HttpServletRequest)
    }
    
}
    //#RedirectServlet.java:: end of class: org.apache.roller.weblogger.ui.rendering.velocity.deprecated.RedirectServlet
