tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "DEMOTTIE Christophe ROSI/DPS" <christophe.demot...@francetelecom.com>
Subject NullPointerException in CoyoteRequestFacade in tomcat 5.0.28
Date Wed, 06 Apr 2005 12:04:13 GMT

Hi,

I have a null exception in CoyoteRequestFacade with Tomcat 5.0.28 and 4.1.27


==> org.apache.coyote.tomcat5.CoyoteRequestFacade
java.lang.NullPointerException
	at org.apache.coyote.tomcat5.CoyoteRequestFacade.isSecure(CoyoteRequestFacade.java:379)
	at myPackage.MyServlet.baseURL(WServlet.java:87)
	at myPackage.MyPage.getBaseURL(WPage.java:193)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at myPackage.MethodBinder.get(MethodBinder.java:26)

I look source code and it seem it correspond to a null request attribute in
the class CoyoteRequestFacade.java
-------------------------------------------
    public boolean isSecure() {
        return request.isSecure();		// line 379
    }
-------------------------------------------

Here is the code of the method in my servlet :
  public String baseURL(ServletRequest request) {
    System.out.println("==> " + ((request == null)? "null" : request.getClass().getName()));
    if (request.isSecure())
        return securedURL(request);
      else
        return normalURL(request);
  }

My servlet method is called with the invoke method
in my MethodBinder class like that :

   protected java.lang.Object get(java.lang.Object object) throws Throwable 
   {
	try {
	  return method.invoke(object,null);
	}
      catch (InvocationTargetException e0) {
        throw e0.getTargetException();
      }
   }


why request is null in CoyoteRequestFacade ?

Thanks in advance,

Christophe.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message