Hitesh Parashar wrote:

> Hi:
> 
> I am having tough time establishing peace between VAJ 
> 4.0 WTE and struts. I am following the "WebSphere
> Version 4 Application Development Handbook".
> 
> WTE requires IBM XML Parser for Java and struts
> requires me to use Xerces. The following packages are
> conflicting between the two
> 
> - org.w3c.dom
> - org.xml.sax
> - org.xml.sax.helpers
> 
> I created open editions of org.w3c.dom, org.xml.sax,
> and org.xml.sax.helpers in the IBM XML Parser for Java
> project and then created a new Xerces project and
> imported all the source from the Xerces. I get
> warnings on doing this. Can I live with these
> warnings? 
> 
> Any suggestion how should I go about importing struts
> in VisualAge 4.0?


The strategy I recommend for getting over the fact that org.* packges are in so 
many different API's is to create a new VAJ Project named "XML Base" and put in 
there the following packages:
org.w3c.dom
org.xml.sax
org.xml.sax.ext
org.xml.sax.helpers

I have several versions of this Project, each with different versions of DOM 
and/or SAX in it (right now, I have loaded version "DOM Level 2, SAX 2" which I 
imported from JAXP 1.1).
I also created a new version of the IBM XML Parser Project and removed the 
non-IBM specific packages from it (is has only com.ibm.xml.* in it now). 
Actaully, I later created an XML4J Project to replace the IBM one.
I created a JAXP project, and imported the javax.xml.* packages into it.
I also have a Xerces Project, with is mostly just the org.apache.xerces packages 
(also one or two packages like org.apache.xml and org.apache.wml.*).
I also have a similar Crimson Project, with just org.apache.crimson.*.

The pattern is to separate the VAJ Projects along product or API lines, so that 
they can co-exist in your VAJ workspace and it is easier to switch between them. 
  It aggravates me to no end that IBM chose to put the org.xml stuff in their 
parser Project, because a lot of VAJ newbies don't yet understand the separation 
of Projects as I have described.  IBM sets a bad example.

HTH,
        Eric
-- 
Eric Rizzo
VAJ Frequently Asked Questions at
http://www.jguru.com/faq/VAJ

Reply via email to