Thanks Olivier but I am trying to keep the xml parsing staff separated from Cocoon.
I am binding my Woody Form to a JAVA Bean which I am populating using a different framework, org.openadaptor
The "System Error: No SAX Parsers found in classpath" is actually coming from this other framework.
To try your suggestion, after getting the Parser from manager.lookup... can I pass it downstream?
i.e., considering the following snippets, the Error is coming from org.openadaptor.doxml.GenericXMLReader.
Now can I get the Parser from Cocoon environment and pass it to this class?
....
public class PopulateMsgs extends AbstractWoodyAction
{
...
MessagesBean messagesBean = new MessagesBean(dbpath, xmlContainerID, xpath);
Collection msgs = messagesBean.getMsgs();
Iterator iterator = msgs.iterator();
...
}
public class MessagesBean
{
...
public Collection getMsgs()
{
DBXMLReader in = new DBXMLReader( dbpath, xmlContainerID, xpath );
Collection msgs = new ArrayList();
String msgStr = "";
org.openadaptor.doxml.GenericXMLReader xmlReader = new GenericXMLReader();
while ( ( msgStr = in.readLine()) != null )
{
Message msg = new Message();
org.openadaptor.dataobjects.DataObject msgDO = xmlReader.fromString(msgStr)[0]; // Uses SAX Parser
msg.setXXX((String)msgDO.getAttributeValue("XXX"));
...
}
...
David Tekeshe
----- Original Message -----
From: "Olivier Billard" <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>
To: <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>
Sent: Friday, April 23, 2004 10:30 AM
Subject: Re: {Spam?} Newbie Question: Howto make Web App access CLASSPATH
> Why don't you use the parser via Cocoon ?
>
> Parser parser = manager.lookup(Parser.ROLE);
>
> David Tekeshe wrote:
> > My Woody Action subclass is coming up with "System Error: No SAX Parsers
> > found in classpath" but 'xerces.jar' is included in the classpath.
> >
> > Cocoon started as a servlet and I am trying to show a Woody form.
> >
> > Help please.
> >
> > David Tekeshe
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
>
