I've been digging through code in Cocoon and Excalibur, trying to decide if there is a bug in either that is keeping me from deploying a cocoon web application as a WAR.
(I've posted details of my problem on the cocoon users mailing list. See http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=110418663626644&w=2 if you're interested. But in short: deploying as a WAR fails, deploying as an expanded folder works). It seems that the problem is with the org.apache.excalibur.source.impl.URLSource: exists() returns true even if the URL provided to the init method does not exist. In cocoon, the URL looks something like "jndi:/localhost/webapp/com.java". (Why such a weird URL? For the life of me, I can't figure it out: something with how rhino is interpreting a javascript file with an "importClass" entry). But - the URLSource constructed with that URL happily says it exists, which causes a cocoon error when it tries to access it. I've written two tests (I didn't see a URLSourceTestCase anywhere?): one with an invalid http URL (http://localhost/garbage) and one with a valid http url (http://www.example.com), and the exists method returns true for both. I've got a simple one line fix for URLSource that seems to do the trick: set m_exists based on the returned contentLength. But - before I submit to bugzilla (the patch and the test case), I thought I'd check first: am I misunderstanding how the URLSource should work, and will I be breaking other things if I make exists() return false? -- PC Paul Christmann Prior Artisans, LLC mailto:[EMAIL PROTECTED] 504-587-9072 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
