Hi !
We get a NullPointerException when using the Struts 1.3.8  html:rewrite
tag in a JSP Page using an Bea Weblogic 8.1 application server.

For testing purposes the page currently contains the following two lines
<html:rewrite page="/meta.css" />
<html:rewrite page="/img/navback.gif" />

The JSP Processor generates something like: 

        if (_html_rewrite0 == null) _html_rewrite0 = new
org.apache.struts.taglib.html.RewriteTag(); //[ /meta.jsp; Line: 7]
        _html_rewrite0.setPageContext(pageContext); //[ /meta.jsp; Line:
7]
 
_html_rewrite0.setParent((javax.servlet.jsp.tagext.Tag)_html_html0); //[
/meta.jsp; Line: 7]
        _activeTag = _html_rewrite0; //[ /meta.jsp; Line: 7]
 
_html_rewrite0.setPage(weblogic.utils.StringUtils.valueOf("/meta.css"));
//[ /meta.jsp; Line: 7]
        _int1 = _html_rewrite0.doStartTag(); //[ /meta.jsp; Line: 7]
        /*** sync AT_BEGIN TagExtra Vars here ***/ //[ /meta.jsp; Line:
7]
 
weblogic.servlet.jsp.StandardTagLib.fakeEmptyBodyTag(pageContext,
_html_rewrite0, _int1, true); //[ /meta.jsp; Line: 7]
        if (_html_rewrite0.doEndTag() == Tag.SKIP_PAGE) { _activeTag =
null; _releaseTags(_html_rewrite0); return; } //[ /meta.jsp; Line: 7]
        _activeTag = _html_rewrite0.getParent();
_html_rewrite0.release(); //[ /meta.jsp; Line: 7]
                                                 ^^^^^^^ here the page
calls the release Method of the (first)rewrite tag 
                                                         The release
Method sets the parameters of the RewriteTag to null.

        //end rewrite custom tag.... //[ /meta.jsp; Line: 7]
        /*** sync AT_BEGIN TagExtra Vars here ***/ //[ /meta.jsp; Line:
7]
        /*** declare & sync AT_END TagExtra Vars here ***/ //[
/meta.jsp; Line: 7]
        _writeText(response, out, _wl_block3, _wl_block3Bytes);
        //^%$__TAG_CODEGEN : begin rewrite custom tag block... //[
/meta.jsp; Line: 8]
        /*** declare AT_BEGIN TagExtra Vars here ***/ //[ /meta.jsp;
Line: 8]
        if (_html_rewrite0 == null) _html_rewrite0 = new
org.apache.struts.taglib.html.RewriteTag(); //[ /meta.jsp; Line: 8]
        ^^^^^^^^^^^^^^^^^^ _html_rewrite is not null
                               
        _html_rewrite0.setPageContext(pageContext); //[ /meta.jsp; Line:
8]
 
_html_rewrite0.setParent((javax.servlet.jsp.tagext.Tag)_html_html0); //[
/meta.jsp; Line: 8]
        _activeTag = _html_rewrite0; //[ /meta.jsp; Line: 8]
 
_html_rewrite0.setPage(weblogic.utils.StringUtils.valueOf("/img/navback.
gif")); //[ /meta.jsp; Line: 8]
        _int1 = _html_rewrite0.doStartTag(); //[ /meta.jsp; Line: 8]
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ here the doStartTag of the
Rewrite Tag is called which calls this.parameters.clear()
                                            which leads to a
NullPointerException because parmeters is null


How is it possible to use two html:rewrite (html:link - the rewrite tag
is derived from the link tag)tags within one JSP without generating a
NullPointerException?
What did we do wrong? Or is it a Bug in the Struts Taglib / BEA JSP
Processor? 

Thanks
andi


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

Reply via email to