When trying to get Turbine working with Tomcat (latest CVS) to look at
the session persistence stuff I came up against a problem. It seems that
recent changes to Tomcat have broken the reflection in RunDataFactory
that calls getContextPath when it is available. The method.invoke() call
throws an IllegalAccessException.

I'm guessing that this is because recently the Facade classes were moved
into their own package and made package access only. It makes sense that
Java won't let you reflect a class that is not visible to you. What we
really want to do is somehow isolate the HttpServletRequest interface
part of the class - which is visible to us - and reflect that instead. 
My knowledge of Java reflections suggests, however, that that is a
nonsensical notion.

My workaround was to actually call req.getContextPath(). This is fine,
except that it means that Turbine will only build with a 2.2 servlet.jar
in the classpath. It will still run in a 2.0 container, the catch
(Exception ex) will handle the failure when getContextPath() is called.

Are we willing to go require 2.2 JSDK to compile?

Or is there a way around the reflection problem?





------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to