FileDocCategorySizeDatePackage
ReqWrapper.javaAPI DocExample685Wed May 28 16:24:14 BST 2003com.jspservletcookbook

ReqWrapper.java

package com.jspservletcookbook;           

import javax.servlet.*;
import javax.servlet.http.HttpServletRequestWrapper;
import javax.servlet.http.HttpServletRequest;

public class ReqWrapper extends HttpServletRequestWrapper{

 private static final String AMP = "&";
 
 public ReqWrapper(HttpServletRequest request){
     
     super(request);
 }
 
 public String getQueryString(){
 
     String query = null;
     //get the query string from the wrapped request object
     query = ((HttpServletRequest)getRequest()).getQueryString();
     if (query != null)
         return query +AMP+"filter="+getClass().getName();
     else
         return "filter="+getClass().getName();
 
 }
}