Re: [Axualize-users] class loading via jar files
Brought to you by:
russwyte
From: Russell W. <rus...@ya...> - 2003-03-10 20:22:18
|
The reason for the <relative-url> tag's existance is simply to aid those developers who compose JSPs in an XML editor that supports schemas. Here is what I mean. <load-classes href="<jsp:expression>request.getAttribute("foo")</jsp:expression>"/> is not legal XML (at least not until it has been processed by the servlet container) so the editor will complain when you save it since it cannot be validated. but... <load-classes> <relative-url> <jsp:expression>request.getAttribute("foo")</jsp:expression> </relative-url> </load-classes> or .. <relative-url id="myURL"> <jsp:expression>request.getAttribute("foo")</jsp:expression> </relative-url> <load-classes> <object idref="myURL"/> </load-classes> is well formed, valid ,and follows the Axualize XML schema. So I added the capability to pass a (only one for now) URL argument to the tag handler since I had a <relative-url> Tag handler which produces a URL instance from the text of the element or the "href" attribute. I hope my explaination has cleared things up a little. It is really helpful to use a poweful XML editor like XMLSpy. In order to facilitate this I had to come up with some creative ways to deal with dynmically created Axualize documents using JSP, PHP, XSL, etc... --- Frank Burough <fbu...@el...> wrote: > Russ: > I assumed the behavior when I used the <relative-url> tag. Looks like > the relative-url tag does nothing but add clarity? If so, I can shorten > my files a bit by just adding my relative URL to the load-classes tag > directly. > > thanks, > > Frank > > On Mon, 2003-03-10 at 14:59, Russell White wrote: > > > Frank, > > > > I need to rewrite some of the docs to be more clear. > > > > Here is something else I forgot to mention about load classes and most of > the > > other URL based tags in Axualize. > > > > By default "href" attributes in most tags are relative. > > > > So if I have an Axualize document at: > > > > /home/russ/axualize/xml/hello.xml > > > > and libraries here: > > /home/russ/axualize/lib/* > > > > > > and I execute it as follows > > > > java -jar %AXUALIZE_HOME%/dist/axualize.jar > > file:/home/russ/axualize/xml/hello.xml > > > > Then I can load libraries like this: > > <load-classes href="../lib/myLibA.jar"/> > > <load-classes href="../lib/myLibA.jar"/> > > > > I think this is why I wrote the tag handler like I did. > > > > The only reason I included the URL argument support at all was to better > > support cases where the URL was generated at document creation time time > using > > something like JSP. > > > > WR > > Russ > > --- Frank Burough <fbu...@el...> wrote: > > > Hi-- > > > > > > I am attempting to load classes via two different jar files, with syntax > > > like: > > > <load-classes> > > > <relative-url href="echo.jar"/> > > > <relative-url href="swingutils.jar"/> > > > </load-classes> > > > > > > > > > To test this I first instantiated an object from 'echo.jar' only. It > > > works just fine. > > > I modified the XML to instantiate only an object from 'swingutils.jar'. > > > It crashed trying to instantiate the object. > > > Next, I removed the line loading the echo.jar file from my XML and > > > re-ran my application. It ran fine and instantiated an object from > > > swingutils.jar without error. > > > > > > I then reversed the order of the jar references (swingutils first then > > > echo), and instantiated an object from > > > swingutils. It ran fine. I added code to instantiate an object from > > > echo.jar, and it crashed attemtpting to instantiate it. > > > > > > My conclusion is that only the classes in the first jar file are > > > visible. Is this a known limitation or a bug? Or, am I once-again doing > > > something foolish? At the moment, I can get by with importing only 1 jar > > > file, but I can see where this may be a limitation in the future. > > > > > > Am I missing something? > > > > > > Thanks, > > > > > > Frank > > > > > > > > > > > > > > > __________________________________________________ > > Do you Yahoo!? > > Yahoo! Tax Center - forms, calculators, tips, more > > http://taxes.yahoo.com/ > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > _______________________________________________ > > Axualize-users mailing list > > Axu...@li... > > https://lists.sourceforge.net/lists/listinfo/axualize-users > __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/ |