专业财税服务推荐

精选优质财税服务,为企业提供专业、可靠的财税解决方案,助力企业健康发展

零报税代理记账
零申报代理记账
报税做账算帐财务报表老会计做账
代理记账
咨询微信:lhy_happyday
工商营业执照年度年报年检公示
全国个体、企业、公司、合作社工商年审年报服务!
个体/10元/次 企业/20元/次
咨询微信:lhy_happyday
财税咨询服务
一对一专业财税咨询,解决企业财税难题,提供定制方案
咨询微信:lhy_happyday
财务分析服务
小规模个体报税0申报税务年报工商年报月报季报报税代理记账
咨询微信:lhy_happyday
立即咨询专业财税顾问
微信号: lhy_happyday
会计从业9年,管理多家个体工商、小规模、一般纳税人等企业的财务、税务等相关工作!。
扫码或搜索添加微信,备注"财税咨询"获取专属优惠
知方号 知方号

21.2.5. The Classic Tag Handler Lifecycle and What It Means to You javaserver pages 3rd edition

The Classic Tag Handler Lifecycle and What It Means to You

Creating a new objectis considered a relatively expensive operation in Java, even thoughit’s less of an issue with the latest Java runtimeenvironments. For high-performance applications,it’s therefore common to try to minimize the numberof objects created and reuse existing objects instead. The lifecycledefined for classic tag handlers in JSP 1.2 allowed a tag handlerinstance to be reused within the code generated for JSP pages undercertain circumstances. This feature has caused a lot of pain andmisunderstanding, which is why the simple tag handlers introduced inJSP 2.0 cannot be reused at all; the potential small loss ofperformance is a huge gain in simplicity, leading to less error pronecode. For backward compatibility and for the scenarios where reusestill makes a difference, classic tag handlers are still reusable inJSP 2.0.

The classic tag handler lifecycle details are pretty complex and aremostly of interest to container developers. But if you developclassic tag handlers, you need to know at least how the lifecyclerelates to instance reuse to ensure that your tag handlers workcorrectly in a container that takes advantage of this feature. Figure 21-7 shows a state diagram for a tag handler thatimplements just the Tag interface.

Figure 21-7. Lifecycle for a tag handler implementing the Tag interface

When ...

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至lizi9903@foxmail.com举报,一经查实,本站将立刻删除。