java j_security_check 在 weblogic 中是如何工作的?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9909519/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-30 22:51:54  来源:igfitidea点击:

How does j_security_check works in weblogic?

javaauthenticationjakarta-eeservletsweb.xml

提问by Ran

I want to know that how does form based authentication works in weblogic.

我想知道基于表单的身份验证在 weblogic 中是如何工作的。

My request is that once user is successfully authenticated,i want to forward request to spring controller and return the required view page.For this i have coded pages as below:

我的请求是,一旦用户成功通过身份验证,我想将请求转发到 spring 控制器并返回所需的视图页面。为此,我编写了如下代码页面:

In Login Page,on clicking submit I am calling action action=j_security_check method=post.

在登录页面中,单击提交时,我正在调用 action action=j_security_check method=post。

In web.xml

在 web.xml 中

<servlet-mapping>
    <servlet-name>LServlet</servlet-name>
    <url-pattern>/j_security_check</url-pattern>
</servlet-mapping>


<login-config>
    <auth-method>FORM</auth-method>
    <realm-name>realm</realm-name>
    <form-login-config>
        <form-login-page>/Login.jsp</form-login-page>
        <form-error-page>/FailLogin.jsp</form-error-page>
    </form-login-config>
</login-config>

<security-role>
    <role-name>TEST</role-name>
</security-role>

<security-constraint>
    <web-resource-collection>
        <web-resource-name>All</web-resource-name>
        <url-pattern>*.jsp</url-pattern>
        <url-pattern>*.htm</url-pattern>
    </web-resource-collection>
    <auth-constraint>
        <role-name>TEST</role-name>
    </auth-constraint>
</security-constraint>  here

On successful authentication,iam not being redirected to LServlet which actually forwards request to Spring Controller. Can any one explain how form based authentication works on Weblogic.

成功认证后,iam 不会被重定向到 LServlet,它实际上将请求转发到 Spring Controller。任何人都可以解释基于表单的身份验证如何在 Weblogic 上工作。

回答by Prashanth

Did you check this ? It is difficult for anyone to explain how something works while related material exists online.

你检查了吗?当相关材料在线存在时,任何人都很难解释某些东西是如何工作的。

http://docs.oracle.com/javaee/1.4/tutorial/doc/Security5.html

http://docs.oracle.com/javaee/1.4/tutorial/doc/Security5.html

回答by user2869664

Hi There will be ldap configuration in the server you using it. Once it is configured then it will redirect the action to login page

您好,您使用的服务器中会有 ldap 配置。配置完成后,它会将操作重定向到登录页面