时间: 2021-07-31 作者:daque
咱们在处置自设置的tag时, 对父类的dostarttag() 和doendtag() 要举行重载,即使在tld文献中设置了tag的属性, 就须要在tag handler里对每个属性设置相映的setxxx/getxxx本领.在dostarttag()中是从template类所设置的hashtable中博得templateparameter东西.在doendtag()中pagecontext.getrequest().getrequestdispatcher(templateparam.getvalue()).include(pagecontext.getrequest(), pagecontext.getresponse());这是在页面里包括经过jsp页的左右文归来经过tag的属性值指定的资源东西(requestdispatcher)所爆发的实质..dostarttag()和doendtag()归来值是在tag interface里设置的静态intskip_body隐含0 skip body evaluation. valid return value for dostarttag and doafterbody. 跳过对body的处置。即是跳过了发端和中断标签之间的代码。eval_body_include 隐含1 evaluate body into existing out stream. valid return value for dostarttag. this is an illegal return value for dostarttag when the class implements bodytag,since bodytag implies the creation of a new bodycontent.将body的实质输入到生存的输入流中。囊括是jsp代码,也不妨被输入skip_page 隐含5 skip the rest of the page. valid return value for doendtag.忽视剩下的页面。eval_page 隐含6continue evaluating the page. valid return value for doendtag().连接实行底下的页在这个类里再有对其余类的援用,我就不列出来了. 诸位不妨本人去接洽.