[jdom-interest] JDOM and TOMCAT

Brett McLaughlin brett.mclaughlin at lutris.com
Tue Aug 15 05:29:29 PDT 2000


Adam Leggett wrote:
> 
> Hi,
> 
> Just started using JDOM and have written a small app that
> updates/changes my XML docs yesterday.
> However, I now want to move this helper class over to Tomcat and call
> methods from a JSP.
> I've put JDOM jar in my Tomcat lib folder, edited Tomcat.bat to include
> it on the classpath and done the same with Xerces.jar.
> I can create an instance of my helper from the JSP no problem, if my
> constuctor looks like this:

Put xerces.jar before xml.jar in your Tomcat configuration file, and it
will work.

Thanks,
Brett


> 
> public EditXml (String filename){
>     this.filename=filename;
>      try{
>       builder= new SAXBuilder();
>     }catch(Exception e){e.printStackTrace();}
> }
> 
> However if I try to build a Document object using the filename arg ie
> 
> public EditXml (String filename){
>     this.filename=filename;
>      try{
>       builder= new SAXBuilder();
>          doc = builder.build(new File(filename));
>     }catch(Exception e){e.printStackTrace();}
> }
> 
> I throws a java.lang.NoSuchMethodError: org.xml.sax.Attributes: method
> getQname(I)Ljava/Lang/String;
> 
> Anyone using JDom and Tomcat sucessfully?
> 
> Adam
> 
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com

-- 
Brett McLaughlin, Enhydra Strategist
Lutris Technologies, Inc. 
1200 Pacific Avenue, Suite 300 
Santa Cruz, CA 95060 USA 
http://www.lutris.com
http://www.enhydra.org



More information about the jdom-interest mailing list