commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank Meijer" <>
Subject RE: [jelly] Re: Junit error in script used by j:include, reportsg eneric error
Date Wed, 02 Apr 2003 14:13:09 GMT

I am just as new as you at Jelly, but I thought it was possible to invoke
methods on objects.  In the jelly:swing example, there is a the following
	<frame var="frame" ...>
Which I interpret as meaning: invoke the "show" method on object "frame".

Btw, have you figured out the difference between include and import?  The
documentation is not very explicit :(


> -----Original Message-----
> From: Bill Brown [] 
> Sent: Tuesday, April 01, 2003 11:35 AM
> To:; 
> Cc:
> Subject: [jelly] Re: Junit error in script used by j:include, 
> reportsgeneric error
> Hi James,
>     Thanks for getting back to me.  I am definitely 
> specifying a filename 
> which, since it worked, seemed OK by me.
> ex:
>        <j:include uri="run.jelly"/>
> run.jelly is a jelly file in the current directory of the 
> executing script. I am using jelly:junit, which I assume is 
> the same thing as jellyunit.
> In order to get around my problem, I added the following truly ugly 
> System.out.println line into within the doTag method. 
> I have included enough context so that you can figure out 
> where I added 
> it.
>        catch (JellyException e) {
>             System.out.println(e.getMessage());  // Mighty 
> ugly, but it works
>             throw new JellyTagException("could not include 
> jelly script",e);
>         }
> With the addition of this line, the error in the included 
> script is no longer hidden. I am pretty sure that whatever 
> code catches the include tag's exception is 
> not printing out any information from the "cause" exception, 
> included in the 
> "could not include jelly script" exception.  The println does 
>  print out the 
> real error.
> Can you suggest a better fix? 
> By the by, while I have your ear, I suspect that the "new" 
> tag does not 
> "return a value" in the same manner in which the "invoke" tag 
> does.  This 
> makes it difficult to embed the "new" tag within other tags 
> like the  "arg" 
> tag.  I will attempt to confirm this problem/issue.
> Also, as another basic problem with the base tags, I have 
> found no way 
> to call a class method on an object.  I could have gotten around the 
> problem I had with the "new" tag by using invoke tag to call 
> the initializer 
> directly on the class.  But, this doesn't seem possible.
> So, are these problems or do I not know what I am doing?  I produced 
> a small tool that provided an XML syntax for running java code in a 
> previous life.  The ability to call class methods was really handy.
> Thanks very much for you time James.
>                                            Bill
> >>> James Strachan 04/01/03 08:28AM >>>
> On 31/3/03 8:35 pm, "Bill Brown" <> wrote:
> > Hi,
> >   I am a new user of Jelly, attempting to get Jelly to work 
> well along 
> > with junit.  So, I used the include tag to run a jelly 
> script and that 
> > jelly script uses junit to report errors. The errors were not 
> > reported, just a generic failure of the script.  I get the string, 
> > "could not include jelly script" in the exception, which 
> led me to the 
> > doTag method within the code.  The 
> includeTag code is 
> > changing the type of error, from JellyException to 
> JellyTagException, 
> > and then setting the cause of the JellyTagException to the original 
> > exception., which appears to run tags, does 
> not access 
> > the cause of an Exception.
> >   Since I am very new to Jelly, I am not sure if I have 
> diagnosed this 
> > problem correctly.  Could you please advise me?
> >   Thanks very much for your time.
> Any chance you could give us an example of a use of 
> <j:include> that fails? Typically the <j:include> expects a 
> URI which is either relative to the current URL context in 
> JellyContext or an absolute URL. Are you specifying a file name maybe?
> BTW if you're looking at using Jelly with Junit have you 
> looked at JellyUnit?


To unsubscribe, e-mail: 
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message