用户访问权限在应用服务器动态分配问题 在服务器端可以控制,通过读取余额,如果有足够的钱就继续,如果钱不够的话就抛出安全异常。见EJB的编程控制安全。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 怎样防止用户直接输入url对这个页面进行访问呢? 问的好!关注ing我觉得好像jaas可以解决吧,不过没具体用过 我首先想到的就是过滤器,其次是jaas,就象tomcat的realm 过滤器听说过,好像可以实现根据session对象对访问的所有网页,进行统一处理(过滤),无需再每一个页面中都增加判断语句jaas是什么ya? google的功能真强大http://java.sun.com/security/jaas/doc/api.html 这是我用过的办法!给每一个页面加上SESSION的判断!你能明白吗?就是在用户登陆时创建SESSION然后在每个页面里跟踪SESSION OK! Find "filter" from Sun J2EE Specification web.xml文件中是有安全设定的,可以防止直接输入url来访问给你个例子 <security-constraint> <web-resource-collection> <web-resource-name>index</web-resource-name> <url-pattern>/admin/*</url-pattern> <http-method>GET</http-method> <http-method>POST</http-method> </web-resource-collection> <auth-constraint> <role-name>systemAdmin</role-name> </auth-constraint> <user-data-constraint> <transport-guarantee>NONE</transport-guarantee> </user-data-constraint> </security-constraint> Svn版本控制器中文乱码的问题............ 打开页面的一瞬间,会显示上一次操作后残留的内容,用户要求直接显示新内容。这个问题如何解决? java计算器 Struts2 多个s:submit 与 权限连接器 请问 Java poi 能否实现在Excel中添加 音频? 我有J2EE初学的几个问题要问,请高手指教 关于DispatchAction,菜鸟求救 ActionForm和Form自动生成的办法? EJB客户端部署,环境设置的问题!!! spring 配置问题 大家快看,好奇怪的问题! 学j2ee,先不学java中的swing,事件处理这几章可不可以.
http://java.sun.com/security/jaas/doc/api.html
给你个例子 <security-constraint>
<web-resource-collection>
<web-resource-name>index</web-resource-name>
<url-pattern>/admin/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>systemAdmin</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>