摘要
为了解决使用Struts进行Web开发中的异常处理和安全控制这2个关键问题, 综合采用了声明式和编程式2种方法,并且分别给出了典型的应用范围。将异常划分为致命、错 误、警告、信息和调试5个级别,在Web层对程序中抛出的自定义异常进行统一捕获和显示。安全 控制分为页面、功能、数据行和数据列4个层次,使用角色来划分权限。提出的方案能够满足大部 分应用的开发需要,对于一些特殊的应用还要进一步改进和完善。
In order to deal with exception handling and access control in Struts-based Web applications development, both declarative method and programmatic method are used and their applying ranges are provided. Exceptions are divided into five levels including fatal, error, warn, info and debug. Custom exceptions are caught and displayed in Web tier. Access control includes four levels such as page, function , row and column, using role to grant permission. The solution can meet with the need of major applications. Progress and improvement need to be made for some special applications.
出处
《北京机械工业学院学报》
2005年第1期44-47,共4页
Journal of Beijing Institute of Machinery