tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stanislav V. Binev" <s...@webmessenger.bg>
Subject Bug
Date Thu, 12 Oct 2000 10:47:57 GMT
Hello,
    We are using Apache with a Tomcat module. We encounter a problem with the following Java
servlet code.  
I am submitting the tomcat.log that identifies the problem as well as the apache log. I also
submit the url.
Thank you in advance if can tell me what is the problem. 

Java code:
   // Process the HTTP request
   public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException,
IOException {
      try {
         HashMap hmParams = Parameters2HashMap(request) ;
         // check the query string for validity:
         if (!hmParams.containsKey(URL)) {
            throw new Exception("No redirect URL specified in this hits_counter servlet call")
;
         }
         if (!hmParams.containsKey(TYPE)) {
            throw new Exception("No type specified in this hits_counter servlet call") ;
         }
         //
         String Type        = (String)hmParams.get(TYPE) ;
         // do the redirect
         String httpReferer = request.getHeader(REFERER) ;
         // use reffer, if any
         if (httpReferer != null) {
            response.setHeader(REFERER, httpReferer) ;
         }
         response.sendRedirect((String)hmParams.get(URL)) ;
        .....

url:
/servlets/earjam.hits_counter?Type=LOGO&SourceID=1&URL=http://www.muze.com

tomcat.log:
Context log: path="/servlets" In error handler 302 null / R( /servlets + /earjam.hits_counter
+ null)
Context log: path="/servlets" Error: Calling servlet Wrapper(tomcat.errorPage S:org.apache.tomcat.servlets.DefaultErrorPage)

apache log:
127.0.0.1 - - [12/Oct/2000:12:31:02 +0200] "GET /servlets/earjam.hits_counter?Type=LOGO&SourceID=1&URL=http://www.muze.com
HTTP/1.1" 200 152


Mime
View raw message