FYI, It could be a mis-match between the Servlet2.3 Jar that Tomcat uses and our own 
Servlet2.2
Jar. 

Thanks,
dims

--- Robin Green <[EMAIL PROTECTED]> wrote:
> Must be a ClassLoader problem - that would explain the bad cast. This should 
> not happen though. I'm X-posting to [EMAIL PROTECTED] Sorry if 
> this is a FAQ.
> 
> Stuart Roebuck <[EMAIL PROTECTED]> wrote:
> >For all those who have been frustratedly putting up with my posts about not 
> >getting Cocoon 2 working under the latest Tomcat release, I am hughly 
> >relieved to say that it now works.  But I now lay the challenge of trying 
> >to work out why the following patch solves the problem!
> >
> >Index: ./src/org/apache/cocoon/matching/WildcardURIMatcherFactory.java
> >===================================================================
> >RCS file: 
>
>/home/cvspublic/xml-cocoon/src/org/apache/cocoon/matching/Attic/WildcardURIMatcherFactory.java,v
> >retrieving revision 1.1.2.21
> >diff -u -r1.1.2.21 WildcardURIMatcherFactory.java
> >--- 
> >./src/org/apache/cocoon/matching/WildcardURIMatcherFactory.java      2000/11/30 
> >21:41:49     1.1.2.21
> >+++ 
> >./src/org/apache/cocoon/matching/WildcardURIMatcherFactory.java      2000/12/04 
> >12:00:20
> >@@ -52,7 +52,7 @@
> >      public String generateMethodSource (NodeIterator conf)
> >      throws ConfigurationException {
> >          return "ArrayList list = new ArrayList();" +
> >-               "String uri = ((HttpServletRequest) 
> >objectModel.get(Cocoon.REQUEST_OBJECT)).getRequestURI();" +
> >+               "String uri = 
> >((org.apache.cocoon.environment.http.HttpRequest) 
> >objectModel.get(Cocoon.REQUEST_OBJECT)).getRequestURI();" +
> >                 "if (uri.startsWith(\"/\")) uri = uri.substring(1);" +
> >                 "if 
> >(org.apache.cocoon.matching.helpers.WildcardURIMatcher.match (list, uri, 
> >pattern)) {" +
> >                 "return list;" +
> >
> >As you can see, I have simply replaced the casting of 
> >objectModel.get(Cocoon.REQUEST_OBJECT) to a HttpServletRequest with a cast 
> >to a org.apache.cocoon.environment.http.HttpRequest.  My debugging seemed 
> >to prove that the original object was an 
> >org.apache.cocoon.environment.http.HttpRequest, but such an HttpRequest 
> >should inherit from HttpServletRequest, as at least one person on the group 
> >has already said, so the original cast should be completely valid.
> >
> >However, this has done the trick.  Everything now works!
> >
> >Why? ... answers on a postcard.
> 
> 
> 
> 
> _____________________________________________________________________________________
> Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com
> 


=====
Davanum Srinivas, JNI-FAQ Manager
http://www.jGuru.com/faq/JNI

__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

Reply via email to