- 浏览: 4557349 次
-
最新评论
在easyjweb应用中关于acegi安全配置的增强
在easyjweb的应用程序中,我们习惯通过easyJWebCommand这一参数来指定服务器端控制器的执行命令。比如newsDocManage.ejf?easyJWebCommand=edit&id=1,将执行NewsDocManageAction中的doEdit方法。
在acegi中,最简单也是最常用的权限控制是基于url拦截的权限控制。比如,为了对添加文章进行权限控制,我们需要添加一个类似如下URL资源:/newsDocManage.ejf/?easyJWebCommand=add.*。这样当用户点击这一连接的时候,将会进一步检查用户对该URL的访问权限,从而达到保护。
在EasyJWeb的快速应用开发构架中,easyJWebCommand这一个命令参数都是以隐藏表示元素的形式存在的,比如,在表单中一般会包含下面的元素:。而大我数表单都是以post方式提交的。此时就无法使用基于URL拦截的方式对doEdit方法进行资源描述及权限控制,而只能使用基于方法调用的资源来描述。但acegi的方法调用需要使用AOP,特别是代理Bean的配置也比较麻烦,而且实现应用中是不会直接像acegi的示例那样直接修改配置文件的,而且这是MVC一级的东西,我们不宜使用AOP,(当然,直接通过AOP配置业务逻辑层组件的除外)。
在今天更新的acegi集成的开发框架版本中,增加对NewsDocManageAction的doEdit方法进行描述及权限控制的支持。也就是说,不管使用get或者是post。在基于easyjweb的应用中,都可以直接使用get的方式来进行权限描述。比如上面的doEdit方法,可以直接使用下面的资源描述:/newsDocManage.ejf/?easyJWebCommand=edit.*
这样,不管是post提交还是get提交,都可以使用一致的方式的对控制器中的方法进行权限设置了。
注意要使用这个功能,需要调整一下web.xml的配置,特别是filter的配置。修改的事项:
1、CharsetFilter需要放在Acegi Filter Chain Proxy的前面
2、两个filter者url-pattern最好保持一致,否则就会在有的地方出现乱码。
修改后的web.xml文件如下:
































































在easyjweb的应用程序中,我们习惯通过easyJWebCommand这一参数来指定服务器端控制器的执行命令。比如newsDocManage.ejf?easyJWebCommand=edit&id=1,将执行NewsDocManageAction中的doEdit方法。
在acegi中,最简单也是最常用的权限控制是基于url拦截的权限控制。比如,为了对添加文章进行权限控制,我们需要添加一个类似如下URL资源:/newsDocManage.ejf/?easyJWebCommand=add.*。这样当用户点击这一连接的时候,将会进一步检查用户对该URL的访问权限,从而达到保护。
在EasyJWeb的快速应用开发构架中,easyJWebCommand这一个命令参数都是以隐藏表示元素的形式存在的,比如,在表单中一般会包含下面的元素:。而大我数表单都是以post方式提交的。此时就无法使用基于URL拦截的方式对doEdit方法进行资源描述及权限控制,而只能使用基于方法调用的资源来描述。但acegi的方法调用需要使用AOP,特别是代理Bean的配置也比较麻烦,而且实现应用中是不会直接像acegi的示例那样直接修改配置文件的,而且这是MVC一级的东西,我们不宜使用AOP,(当然,直接通过AOP配置业务逻辑层组件的除外)。
在今天更新的acegi集成的开发框架版本中,增加对NewsDocManageAction的doEdit方法进行描述及权限控制的支持。也就是说,不管使用get或者是post。在基于easyjweb的应用中,都可以直接使用get的方式来进行权限描述。比如上面的doEdit方法,可以直接使用下面的资源描述:/newsDocManage.ejf/?easyJWebCommand=edit.*
这样,不管是post提交还是get提交,都可以使用一致的方式的对控制器中的方法进行权限设置了。
注意要使用这个功能,需要调整一下web.xml的配置,特别是filter的配置。修改的事项:
1、CharsetFilter需要放在Acegi Filter Chain Proxy的前面
2、两个filter者url-pattern最好保持一致,否则就会在有的地方出现乱码。
修改后的web.xml文件如下:
































































在easyjweb的应用程序中,我们习惯通过easyJWebCommand这一参数来指定服务器端控制器的执行命令。比如newsDocManage.ejf?easyJWebCommand=edit&id=1,将执行NewsDocManageAction中的doEdit方法。
在acegi中,最简单也是最常用的权限控制是基于url拦截的权限控制。比如,为了对添加文章进行权限控制,我们需要添加一个类似如下URL资源:/newsDocManage.ejf/?easyJWebCommand=add.*。这样当用户点击这一连接的时候,将会进一步检查用户对该URL的访问权限,从而达到保护。
在EasyJWeb的快速应用开发构架中,easyJWebCommand这一个命令参数都是以隐藏表示元素的形式存在的,比如,在表单中一般会包含下面的元素:。而大我数表单都是以post方式提交的。此时就无法使用基于URL拦截的方式对doEdit方法进行资源描述及权限控制,而只能使用基于方法调用的资源来描述。但acegi的方法调用需要使用AOP,特别是代理Bean的配置也比较麻烦,而且实现应用中是不会直接像acegi的示例那样直接修改配置文件的,而且这是MVC一级的东西,我们不宜使用AOP,(当然,直接通过AOP配置业务逻辑层组件的除外)。
在今天更新的acegi集成的开发框架版本中,增加对NewsDocManageAction的doEdit方法进行描述及权限控制的支持。也就是说,不管使用get或者是post。在基于easyjweb的应用中,都可以直接使用get的方式来进行权限描述。比如上面的doEdit方法,可以直接使用下面的资源描述:/newsDocManage.ejf/?easyJWebCommand=edit.*
这样,不管是post提交还是get提交,都可以使用一致的方式的对控制器中的方法进行权限设置了。
注意要使用这个功能,需要调整一下web.xml的配置,特别是filter的配置。修改的事项:
1、CharsetFilter需要放在Acegi Filter Chain Proxy的前面
2、两个filter者url-pattern最好保持一致,否则就会在有的地方出现乱码。
修改后的web.xml文件如下:
































































在easyjweb的应用程序中,我们习惯通过easyJWebCommand这一参数来指定服务器端控制器的执行命令。比如newsDocManage.ejf?easyJWebCommand=edit&id=1,将执行NewsDocManageAction中的doEdit方法。
在acegi中,最简单也是最常用的权限控制是基于url拦截的权限控制。比如,为了对添加文章进行权限控制,我们需要添加一个类似如下URL资源:/newsDocManage.ejf/?easyJWebCommand=add.*。这样当用户点击这一连接的时候,将会进一步检查用户对该URL的访问权限,从而达到保护。
在EasyJWeb的快速应用开发构架中,easyJWebCommand这一个命令参数都是以隐藏表示元素的形式存在的,比如,在表单中一般会包含下面的元素:。而大我数表单都是以post方式提交的。此时就无法使用基于URL拦截的方式对doEdit方法进行资源描述及权限控制,而只能使用基于方法调用的资源来描述。但acegi的方法调用需要使用AOP,特别是代理Bean的配置也比较麻烦,而且实现应用中是不会直接像acegi的示例那样直接修改配置文件的,而且这是MVC一级的东西,我们不宜使用AOP,(当然,直接通过AOP配置业务逻辑层组件的除外)。
在今天更新的acegi集成的开发框架版本中,增加对NewsDocManageAction的doEdit方法进行描述及权限控制的支持。也就是说,不管使用get或者是post。在基于easyjweb的应用中,都可以直接使用get的方式来进行权限描述。比如上面的doEdit方法,可以直接使用下面的资源描述:/newsDocManage.ejf/?easyJWebCommand=edit.*
这样,不管是post提交还是get提交,都可以使用一致的方式的对控制器中的方法进行权限设置了。
注意要使用这个功能,需要调整一下web.xml的配置,特别是filter的配置。修改的事项:
1、CharsetFilter需要放在Acegi Filter Chain Proxy的前面
2、两个filter者url-pattern最好保持一致,否则就会在有的地方出现乱码。
修改后的web.xml文件如下:
































































相关推荐
- **适用场景**:适用于快速开发中小型Web应用,特别是在需要简化编码流程、减少样板代码的情况下表现突出。 #### 二、获取EasyJWeb - **下载方式**:通过官方网站下载EasyJWeb的SDK及源代码;或者直接从SVN库中...
在Struts中,大量的XML配置可能导致项目复杂度增加,而Easyjweb则试图通过减少XML配置和增强自动化来解决这个问题。 7. 社区支持与维护:作为开源项目,Easyjweb拥有一定的社区支持,开发者可以在论坛或GitHub等...
- **高度定制化**:EasyJWeb 2.0 允许开发者根据项目需求进行自定义配置,提供了丰富的扩展接口,以满足不同场景的应用需求。 **3. 开发工具与集成** - **IDE支持**:与主流的Java开发环境如Eclipse、IntelliJ ...
MVC(Model-View-Controller)是一种广泛应用于软件开发的设计模式,最初由Trygve Reenskaug提出,并在Smalltalk-80环境中得到了应用。这种模式的核心思想在于将应用程序分为三个主要部分:模型(Model)、视图...
《EasyJWeb配置详解与应用指南》 EasyJWeb是一款基于Java的企业级Web开发框架,其核心在于简化开发流程,提高开发效率。本文将详细解析EasyJWeb的配置过程,并介绍其常用命令及其应用场景。 首先,EasyJWeb的项目...
在IT行业中,EasyJWeb是一个轻量级的Java Web应用框架,主要用来简化Web应用程序的开发。本示例将引导我们逐步了解如何使用EasyJWeb创建一个简单的"Say Hello"应用,这通常是我们初次接触任何Web框架时都会做的经典...
EasyJWeb是一个在Java EE开发领域备受关注的轻量级框架,它的核心目标是简化企业级应用的构建过程,提高开发效率。这个框架以其小巧、灵活、易用的特点,为开发者提供了高效的工作流和强大的功能支持。 一、框架...
作为一个旨在让基于Java的Web应用程序开发变得直接、快速、简易的框架,EasyJWeb提供了一个IoC容器,并对企业级应用中的一些通用业务逻辑(如分页、查询、DAO等)进行了抽象及封装,提供了一套可以直接操作、应用企业...
配置easyjweb项目 ,要用到的细节,免于发生不必要的错误
通过学习这些资料,开发者不仅可以掌握Wincvs的版本控制技巧,还能了解到如何在Struts框架下利用AjaxAnywhere增强Web应用的交互性,并且能够运用EasyJWeb快速开发Java Web项目。这些都是现代Web开发中的重要技能,...
在【描述】中提到的"在MyEclipse中的配置"是指如何在MyEclipse集成开发环境中设置和导入Easyjweb项目。这通常涉及创建新项目、导入现有源代码、配置项目属性(如Java构建路径、Web项目设置)、添加库依赖以及设置...
`lgpl.txt`文件通常包含的是 Lesser General Public License (LGPL) 的文本,这表明EasyJWeb框架0.7.0遵循LGPL开源协议,允许开发者在开源或商业项目中自由使用、修改和分发框架,但对修改后的源码有一定的开放要求...
EasyJWeb是一款基于Java的轻量级Web开发框架,其在企业级应用中广泛使用,特别是在权限管理方面表现出色。本文将深入探讨EasyJWeb如何实现用户权限控制,以及相关的核心概念和技术点。 一、EasyJWeb权限体系概述 ...
【EasyJWeb源码构建指南】是一篇关于如何构建和设置EasyJWeb开源项目的文章。EasyJWeb采用了Subversion(SVN)作为版本控制工具,而Maven作为项目管理工具,确保开发流程的标准化和高效性。 首先,你需要获取源代码...
`Page`和`WebForm`是EasyJWeb中用于展示和数据绑定的类,它们帮助开发者在视图层处理用户交互和数据展示。`Module`则用来组织和管理相关的控制器和视图,形成模块化的应用程序结构。 `AbstractCmdAction`和`...
easyjweb-2.0 java 快速开发 easyjweb-2.0 java 快速开发 easyjweb-2.0 java 快速开发