cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Engelhart <mengelh...@earthtrip.com>
Subject Re: JDOM import and Cocoon 1.8
Date Wed, 07 Nov 2001 17:18:18 GMT
Your problem is that in Cocoon 1.8,  the org.w3c.dom.Document is 
implicitly included for use by XSP.   To make this work you need to 
always be specific about what package you're talking about.   To be safe 
I would recommend always using the full  package name for the 
org.jdom.Document class so you don't get confused and/or confuse other 
developers since they're the same class name as the Xerces Document 
class.

Mike
On Wednesday, November 7, 2001, at 12:08 PM, Ted Mead wrote:

>
> I'm trying to use JDOM and have placed the jdom.jar in my main Tomcat
> (3.2.1) lib directory.
>
> To check that the import is going to work correctly, I wrote a simple 
> xml
> file that looks like this:
>
> <?xml version="1.0"?>
> <?cocoon-process type="xsp"?>
> <xsp:page language="java" 
> xmlns:xsp="http://www.apache.org/1999/XSP/Core">
> <xsp:structure>
> <xsp:include>org.jdom.*</xsp:include>
> </xsp:structure>
> <page title="Samet Press Releases">
> <xsp:logic>
> </xsp:logic>
> <p>Hello</p>
> </page>
> </xsp:page>
>
> If I remove the <xsp:structure> tags and the line between (which does 
> the
> import of the jdom.jar files), then it works fine and I get "Hello".  
> With
> the import, I'm getting the following errors (among others):
>
> 24: class 
> _usr._local._apache._sites._amead_spinweb_net._htdocs._Jdomtest
> must be declared abstract. It does not define void
> populateDocument(javax.servlet.http.HttpServletRequest,
> javax.servlet.http.HttpServletResponse, org.w3c.dom.Document) from class
> org.apache.cocoon.processor.xsp.XSPPage.
>     public class _Jdomtest extends XSPPage {
>                  ^
> 28: Ambiguous class: org.w3c.dom.Document and org.jdom.Document
>       public void populateDocument(
>
> I've been all over the discussion groups and can't find anything 
> specific.
> I even saw one posting of this exact error, but no resolution.  I know 
> that
> JDOM can be used with Cocoon, but am stuck.  I'd appreciate any input.
> - Amy Mead
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message