Is there any way to insert one taglib tag into other of the same class? The problem is that I try to use pageContext parameter in the tag body and initiate it with ExtraInfo class, the container refuses to initiate this parameter twice.

Serge Knystautas

You can manually construct and call a tag class. You should call setPageContext() and setParent(), call any attribute methods you want, then call doStartTag()/doInitBody()/doAfterBody()/doEndTag() as per the tag lifecycle.

You should not call the ExtraInfo class directly as this is a JSP compile time class useful for declaring local variables. It gives the JSP compiler information as to what fields will be passed from the tag to the page, and in what scope in the page should they be declared. It is not called at runtime.

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact