Silly question, perhaps, but you do have </html:text> and not </html:txt>,
don't you?

--
Martin Cooper


----- Original Message -----
From: "Nick Chalko" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 27, 2001 11:53 AM
Subject: null pointer error


> My jsp page with  the following tag
> <html:text property="username" size="20" maxlength="20" value="test">
> inside
> </html:txt>
>
> generates the following java code (from VAJ 3.5.3)
>          do {
>                         // end
>                         out.print(_jspx_html_data[4]);
>                         // begin
> [file="C:\\login.jsp";from=(16,0);to=(16,69)]
>                             /* ----  html:text ---- */
>                             org.apache.struts.taglib.html.TextTag
> _jspx_th_html_text_1 = new org.apache.struts.taglib.html.TextTag();
>
> _jspx_th_html_text_1.setPageContext(pageContext);
>
> _jspx_th_html_text_1.setParent(_jspx_th_html_form_2);
>
> JspRuntimeLibrary.introspecthelper(_jspx_th_html_text_1,
> "maxlength","20",null,null, false);
>
> JspRuntimeLibrary.introspecthelper(_jspx_th_html_text_1,
> "property","username",null,null, false);
>
> JspRuntimeLibrary.introspecthelper(_jspx_th_html_text_1,
> "size","20",null,null, false);
>
> JspRuntimeLibrary.introspecthelper(_jspx_th_html_text_1,
> "value","test",null,null, false);
>                             try {
>                               int _jspx_eval_html_text_1 =
> _jspx_th_html_text_1.doStartTag();
>                               if (_jspx_eval_html_text_1 ==
> Tag.EVAL_BODY_INCLUDE)
>                               throw new JspTagException("Since tag
> handler class org.apache.struts.taglib.html.TextTag implements BodyTag,
> it can't return Tag.EVAL_BODY_INCLUDE");
>                           if (_jspx_eval_html_text_1 != Tag.SKIP_BODY) {
>                               try {
>                               if (_jspx_eval_html_text_1 !=
> Tag.EVAL_BODY_INCLUDE) {
> // the next nile sets out to null
>                               out = pageContext.pushBody();
>
> _jspx_th_html_text_1.setBodyContent((BodyContent) out);
>                           }
>                           _jspx_th_html_text_1.doInitBody();
>                           do {
>                           // end
>                           out.print(_jspx_html_data[5]);
>                           // begin
> [file="C:\\login.jsp";from=(25,0);to=(25,0)]
>                           } while (_jspx_th_html_text_1.doAfterBody() ==
> BodyTag.EVAL_BODY_TAG);
>                       } finally {
>                           if (_jspx_eval_html_text_1 !=
> Tag.EVAL_BODY_INCLUDE)
>                               out = pageContext.popBody();
>                       }
>                   }
>                   if (_jspx_th_html_text_1.doEndTag() == Tag.SKIP_PAGE)
>                       return;
>               } finally {
>                   _jspx_th_html_text_1.release();
>               }
>
>
> The proplem is  pageContext.pushBody() returns null which then fails the
> next time something is written to out.
> Any ideas.
>
> R,
> Nick
>


Reply via email to