You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Gopalakrishnan Ramanujam <gr...@cisco.com> on 2001/10/22 23:48:00 UTC

Is there a TextTagLib without a bean

Hi,

I am using the Taglib to generate the HTML content for my page. I cannot 
have a JSP and bean because all my contents are dynamic in nature. For this 
reason I am calling the Taglib directly from a servlet to generate the 
HTML(I am using the Taglib to have a common look across all the apps using 
the Taglib).

I am using a Text Taglib from apache from my servlet. When I call the 
doStartTag it says there is no getter method for the bean. I am giving the 
code snippet for this.

   org.apache.struts.taglib.html.TextTag _jspx_th_text_0 = new 
org.apache.struts.taglib.html.TextTag();
_jspx_th_text_0.setPageContext(pageContext);
_jspx_th_text_0.setParent(_jspx_th_form_0);
_jspx_th_text_0.setName("userNameIn");
//_jspx_th_text_0.setProperty("userNameIn");
try {
      int _jspx_eval_uii_text_0 = _jspx_th_uii_text_0.doStartTag();
} catch( Exception ex) {
}

If I use setName() it is saying that cannot find bean userNameIn in scope null.

If I use setPropety() it is saying the no getter methods for userNameIn.

I need not have a bean since all my contents are dynamic and my text name 
will be dynamic. I will use getParameter to get the values from the 
HTTPRequest. Is there any way to use these HTML Taglibs without having a 
bean. (getter and setter methods).

Thanks
Gopal