摘要
OGNL(Object-Graph Navigation Language)是Struts2默认的表达式语言,是Struts2的核心内容之一。为了让读者快速掌握进而熟练使用Struts2 OGNL,文章首先深刻剖析了OGNL的工作原理,接着讨论了OGNL的使用场合以及常见的几种应用,最后重点以一个电子商务系统中的产品发布管理模块的实现为例说明OGNL的使用、数据类型转换以及数据在View层和Controller层之间的流转处理,为使用Struts2开发信息管理系统以及对Struts2的教学提供了较高的理论指导和实践参考价值。实践证明,使用OGNL可以极大地提高Struts2对Web应用的表现能力。
OGNL is the Struts2 default expression language and one of Struts2 core content. In order to let reader quickly master Struts2 OGNL and skilfully use it, firstly analyzed the OGNL principle of work profoundly, then discussed when and how to use it; finally talced one product release management module for electronic commerce system as example, demonstrated how to use OGNL in detail, it is a high theoretical guidance and practical reference value for the development of management information system with Struts2 and the teaching Struts2. As a result,using OGNL can significantly enhance the Struts2 Web application presentation ability.
出处
《计算机技术与发展》
2013年第3期183-186,190,共5页
Computer Technology and Development
基金
浙江省科技计划资助项目(2008C31009)