Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 59012 invoked from network); 22 May 2008 22:27:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 May 2008 22:27:18 -0000 Received: (qmail 76006 invoked by uid 500); 22 May 2008 22:27:17 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 75560 invoked by uid 500); 22 May 2008 22:27:15 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 75549 invoked by uid 500); 22 May 2008 22:27:15 -0000 Delivered-To: apmail-jakarta-tomcat-dev@jakarta.apache.org Received: (qmail 75546 invoked by uid 99); 22 May 2008 22:27:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 May 2008 15:27:15 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 May 2008 22:26:30 +0000 Received: by brutus.apache.org (Postfix, from userid 33) id 0B26C234C118; Thu, 22 May 2008 15:26:51 -0700 (PDT) From: bugzilla@apache.org To: tomcat-dev@jakarta.apache.org Subject: DO NOT REPLY [Bug 45065] New: RequestDispatcher restricts access to ApplicationHttpRequest X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: newchanged X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Tomcat 6 X-Bugzilla-Component: Catalina X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tech@jotobjects.com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: tomcat-dev@jakarta.apache.org X-Bugzilla-Target-Milestone: default X-Bugzilla-Changed-Fields: Message-ID: Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Thu, 22 May 2008 15:26:51 -0700 (PDT) X-Virus-Checked: Checked by ClamAV on apache.org https://issues.apache.org/bugzilla/show_bug.cgi?id=45065 Summary: RequestDispatcher restricts access to ApplicationHttpRequest Product: Tomcat 6 Version: unspecified Platform: PC OS/Version: Windows Vista Status: NEW Severity: normal Priority: P2 Component: Catalina AssignedTo: tomcat-dev@jakarta.apache.org ReportedBy: tech@jotobjects.com This exception is generated when a servlet calls Method.invoke() on the ServletRequest object when the servlet is run with RequestDispatcher.forward java.lang.IllegalAccessException: Class com.jotobjects.demo.formexample.FormExampleShowBean can not access a member of class org.apache.catalina.core.ApplicationHttpRequest with modifiers "public" at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65) at java.lang.reflect.Method.invoke(Method.java:578) When the servlet is run with normally with an HTTP request the Request class is org.apache.catalina.connector.RequestFacade and the method can be invoked with reflection. But when the method is run with RequestDispatcher the Request class is org.apache.catalina.core.ApplicationHttpRequest and IllegalAccessException is raised. Here is the code that causes the error - java.lang.reflect.Method m = request.getClass().getDeclaredMethod("getPathInfo",null); Object value = m.invoke(getRequest(),null); Have tried starting with a SecurityManager with AllPermissions but this does not change the outcome. Same problem in Tomcat 5 and Tomcat 4. The same codes works in Tomcat 3 and with Jetty -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org