People, I fixed the problem. I'll post anyway the msg I was about to send to the list right before I relalized it was a banal NullPointerException that for some reason did not produce any diagnostics.

This may be interesting for those who have similar problems
in then future and to show how differently app servers may behave

thank you

Luca


======================================================================= Sorry to be a pain, but maybe someone has a clue about this absolute mistery with Weblogic and nested tags. First I created a minimal JSP with just two tags:


<wall:img src="/images/wbmp/categories.wbmp" alt=""> <wall:alternate_img src="http://server/categories.gif"; test="${capabilities.gif}" /> </wall:img>

       <wall:img src="/images/wbmp/homeaccess.wbmp" alt="">
         <wall:alternate_img src="http://server/odmpix/homeaccess.gif"; 
test="${capabilities.gif}" />
       </wall:img>

then I modified the taglib code to print messages the console to know the 
sequence
on which doStartTag() and release() were invoked.
In addition, I added messages along the way, such as (doStartTag() of 
alternate_img):


System.out.println("still exist 10");

        //one and only one attribute at the time (apart from 'test' which is 
compulsory)
        int c = 0;
        if (!src.equals("")) c++;
        if (!eu_imode_icon.equals("")) c++;
        if (!ja_imode_icon.equals("")) c++;
        if (!opwv_icon.equals("")) c++;
        if (nopicture) c++;

        System.out.println("still exist 20");

What I got in the console seems unesplicable. It's like if the tag
was garbage collected while its code is running!


img: doStartTag() setting src on alternate_img tag:http://server/odmpix/categories.gif alternate_img: doStartTag() still exist 10 still exist 20 still exist 30 forund parent img [EMAIL PROTECTED] still exist 40 still exist 50 test && !src.equals("") = true about to img.Src2(http://server/odmpix/categories.gif). img= [EMAIL PROTECTED] alternate_img: release() img: release() img: doStartTag() setting src on alternate_img tag:http://server/odmpix/homeaccess.gif alternate_img: doStartTag() still exist 10 alternate_img: release() img: release()

The Alternative_img.doStartTag() code stops running in the middle
of nowhere special and I don't get any diagnostics.

Isn't that weird?  what am I missing?

Thanks

Luca



luca wrote:


Hallo, I have implemented a tag lib with some cases of nested cooperating tags.

For ex:

    <wall:img src="pix/cinema.gif" alt="Cinema" >
     <wall:alternate_img src="pix/cinema_big.gif" test="${bool}" />
    </wall:img>

    <wall:img src="pix/games.gif" alt="Games" >
     <wall:alternate_img src="pix/games_big.gif" test="${bool}" />
    </wall:img>

(complete example of usage: http://wurfl.sourceforge.net/java/coolmenu.php)

My big problem is that I just found out this doesn't work
on Weblogic 8.1 and, what's worse it does not produce
any significant diagnostics in the weblogic logs.

The JSP starts rendering and fails as soon as the second instance of the
img tag is encountered. Error msg (in the browser window):

{Exception in myjsp.jsp] null

On Tomcat 4 it works no problem.

Of course, I suspect that the problem could be due to different
strategies that the two appserver employ to reuse tag instances,
but I am not sure how I can fix this.
I do have some instance variables (necessary to allow the two tags too
cooperate), but I make sure they are initialized by doStartTag().

I attach the code of the two tags, if this can help...

thanks



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to