浏览 3616 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2004-05-28
web.xml中welcome-file是index.jsp index.jsp里做個redirect,這樣<logic:redirect forward="mainMenu"/> 在struts-config.xml中有定義,這樣<forward name="mainMenu" path="/mainMenu.do" redirect="true"/>,是在<global-forwards>元素下 不過我遇到的問題是mainMenu.do是需要有權限才能進入的,如果我沒有這個權限進入,它就會自動轉到login頁面.看web.xml還有login-config配置如下 <login-config> <auth-method>FORM</auth-method> <form-login-config> <form-login-page>/login.jsp</form-login-page> <form-error-page>/loginError.jsp</form-error-page> </form-login-config> </login-config> 我想一定是通過它過去的,看有没有哪位大大帮忙详细说说 引用 <login-config>
The login-config element is used to configure the authentication method that should be used, the realm name that should be used for this application, and the attributes that are needed by the form login mechanism. <auth-method>BASIC/DIGEST/FORM/CLIENT-CERT</auth-method> The auth-method element is used to configure the authentication mechanism for the web application. As a prerequisite to gaining access to any web resources which are protected by an authorization constraint, a user must have authenticated using the configured mechanism. Legal values for this element are "BASIC", "DIGEST", "FORM", or "CLIENT-CERT". <realm-name>Name Of Realm</realm-name> The realm name element specifies the realm name to use in HTTP Basic authorization. <form-login-config> The form-login-config element specifies the login and error pages that should be used in form based login. If form based authentication is not used, these elements are ignored. <form-login-page>path/to/loginpage.jsp</form-login-page> Defines the location in the web app where the page that is used for login can be found. <form-error-page>path/to/errorpage.jsp</form-error-page> Defines the location in the web app where the error page that is displayed when login is not successful can be found. 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |
发表时间:2004-06-02
再來說說appfuse:
LookupDispatchAction<=BaseAction<=UserAction; UserDAO<=UserDAOHibernate. 在他們之間存在著一個service layer--UserManager UserAction依賴于UserManager,UserManager依賴于UserDAO,只是在appfuse中,依賴關係是由spring來管理的.商業邏輯的實現是由UserAction來實現的. 在此UserManager是商業邏輯和持久層的一個介面,我就把它說成service layer應該沒有問題,只是它服務于dao和商業邏輯. |
|
返回顶楼 | |
发表时间:2004-06-03
前段时间看到一些关于service layer的资料,写一下:sl只是定义了一个应用的边界,它的目的仅仅是建立一套实现client layer接口的操作并将应用的商业逻辑封装起来,它只是在做一些针对商业逻辑的事务性的处理以及协调各个商业逻辑,从而使其保持运行的正确性。
比较一下上面那个服务于dao和商业逻辑的manager,可以感觉出还是没有什么矛盾的。 |
|
返回顶楼 | |