哇,听上去就很厉害。
不过我还不太熟悉struts,很少用角色管理方面的功能,提不出什么意见。
我自己倒是想开发一个配置文件向导,因为不想用盗版的jbuilder,而ecilpse好像没这个功能(我没用过,听说的-_-;)。大家对我这个想法有什么建议吗?

解决方案 »

  1.   

    这些 我用jsp+bean都完成了
      

  2.   

    JSF快速上手,struts是古人用的东西.不然又落伍了.
      

  3.   

    这些 我用jsp+bean都完成了
    JSF快速上手,struts是古人用的东西.不然又落伍了
    --------
    我就知道会有这种事情。每次我开始学一种工具,马上它就落伍了。-_-###
      

  4.   

    我也想知道怎么实现 .
    我正在做权限管理这块,我是第一次学java第一次带java,希望能学到一点经验.
    目前我只是就我的理解,将数据层用javabean实现了一个个类.
    不知道怎样更好地关联起来.up
      

  5.   

    大家一起努力.我在看jive源码.应该对你我有帮助.不要理会那些人的看法。《人件》你看过吗。上面说技术不在乎新和旧。只要能出东东就可以了。struts的核心就是MVC,webword,spring这些新东东都是围绕MVC在简化开发过程上做文章。主要的是思想。说不定明天又会出一个XXX的东东,让很多人跟风去学习了。个人感觉技术是学不完的。编程思想才是最重要的。
      

  6.   

    同意witboy_1979的观点,所有开发技术的都有共同点,一种技术使用习惯了,能有生产率就ok。数据库访问我是用hibernate实现的。
    因为操作树(菜单显示)的实现是利用了Struts-menu,所以使用了Struts。希望大家可以多提点意见,看看还有什么不完善的地方。
      

  7.   

    我也为用户权限和功能的问题苦恼过!不过经验不是很多,希望可以和楼主一块交流。
    楼主说的用户和用户角色是不是像用户和组的关系?相同的组的用户有相同的权限?
    还有能不能不用数据库,用xml文件,这样是不是更好重用?当然也可以同时支持数据库?
      

  8.   

    用户和用户角色就是用户和组的关系,一个用户角色所包含的所有用户具有相同的权限。
    如果都用xml文件,个人觉得操作起来比较麻烦,还有事务处理的问题需要考虑,而使用数据库就比较好解决这些问题。
    重用性的问题针对不同的数据库类型提供不同的数据库脚本就可以了,没有什么大的影响。
      

  9.   

    我现在正在做,也是用的STRUTS留个MSN好交流!!我的是[email protected]
      

  10.   

    有兴趣的同志就在这个帖子里交流交流吧。数据库表我建了三个:
    drop table userrole;create table userrole(
    rolename varchar(20) not null,
    description varchar(200),
    primary key(rolename)
    );drop table userinfo;create table userinfo (
    username varchar(20) not null, 
    description varchar(200),
    email varchar(50),
    createTime date,
    validmonth int,
    rolename varchar(30),
    primary key(username)
    );drop table rolelimit;create table rolelimit(
    id int unsigned not null auto_increment,
    rolename varchar(20) not null,
    operatename varchar(100) not null,
    primary key(id)
    );功能点配置文件的格式如下:
    <?xml version="1.0"?>
    <MenuConfig>

    <Displayers>
    <Displayer   name="DropDown" type="net.sf.navigator.displayer.DropDownMenuDisplayer"/>
         <Displayer   name="Simple" type="net.sf.navigator.displayer.SimpleMenuDisplayer"/>
    </Displayers>

    <!-- check attibute default is false -->
    <Menus>

    <Menu name="index" title="INDEX" description="Index" image="images/case-new.png" location="index.jsp" check="false" width="200"/>

    <Menu name="userManager" title="USERMANAGER" description="User manager" width="200">
    <Item name="listUser"  title="LISTUSER"  description="Browser user" image="images/party-open.png" action="UserAction" method="listUser"   show="true"  check="true">
    <Item name="test1"  title="TEST1"   description="test 1" image="images/party-new.png" action="UserAction" method="createUser" show="true"  check="true"/>
    <Item name="test2"  title="TEST2"  description="test 2" image="images/party-open.png" action="UserAction" method="editUser"   show="false" check="true"/>
    </Item>
    <Item name="addUser"   title="ADDUSER"   description="Add user" image="images/party-new.png" action="UserAction" method="createUser" show="true"  check="true"/>
    <Item name="editUser"  title="EDITUSER"  description="Edit user" image="images/party-open.png" action="UserAction" method="editUser"   show="false" check="true"/>
    <Item name="deleteUser" title="DELETEUSER"  description="Delete user" image="images/party-open.png" />
    </Menu>

    <Menu name="userRoleManager" title="USERROLEMANAGER"  description="User role manager" width="200">
    <Item name="listUserRole"  title="LISTUSERROLE"  description="Browser user role" image="images/select-all.png" action="UserRoleAction" method="listUserRole"   show="true"  check="true"/>
    <Item name="addUserRole"   title="ADDUSERROLE"   description="Add user role" image="images/prefs.png" action="UserRoleAction" method="createUserRole" show="true"  check="true"/>
    <Item name="editUserRole"  title="EDITUSERROLE"  description="Edit user role" image="images/reports.png" action="UserRoleAction" method="editUserRole"   show="false" check="true"/>
    <Item name="deleteUserRole" title="DELETEUSERROLE"  description="Delete user role" image="images/find.png" location="deleteUserRole.jsp" show="true" check="true"/>
    </Menu>

    <Menu name="index1" title="INDEX1" description="Index" check="true" />
    </Menus></MenuConfig>这个配置文件和Struts-menu的配置文件很类似,稍微做了一点改动,我也相应的修改了Struts-menu的源代码。
      

  11.   

    其实这个框架的思路也比较简单,如果说复杂的地方个人感觉有两点:
    1、用户安全过滤,我打算用filter实现过滤,所有用户访问都先经过一个filter,判断用户对此功能点是否具有操作权限。
    2、显示,一是操作菜单显示(利用Struts-menu还好解决),另一个是配置角色安全信息的功能点显示,我想显示为一个带CheckBox的操作树,这个估计自己还要写JavaScript,比较痛苦。