Announcement Announcement Module
Collapse
No announcement yet.
Login.jspx form action explanation Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Login.jspx form action explanation

    hi,

    This is a part of the code generated by spring security.

    application-contextSecurity.XML

    HTML Code:
    	<!-- HTTP security configurations -->
        <http auto-config="true" use-expressions="true">
        	<form-login login-processing-url="/resources/j_spring_security_check" login-page="/login" authentication-failure-url="/login?login_error=t"/>
            <logout logout-url="/resources/j_spring_security_logout"/>
    login.jspx

    HTML Code:
    <spring:url value="/resources/j_spring_security_check" var="form_url" />
    	
    	<form name="f" action="${fn:escapeXml(form_url)}" method="POST">

    can you explain the exact working of this page.

    1)Where is the actual location of 'j_spring_security_check' ?
    2)How is it possible for us to make some other page which can validate user authentication?
    3)can you explain the exact working of this page.

    Thanks in advance
    Privin Thomas

  • #2
    1) There is no phsyical location for this jsp spring security i guess create it dynamically

    j_spring_security_check. is equialant to servlet specification j_security_check.

    This is the default action.

    DefaultLoginPageGeneratingFilter will generate default login page.

    you can change the setting in XML to load your customize login page.

    Code:
      <form-login login-page="/login.jsp"
    2) bold line will cause pages will be secure login.jsp and fail.jsp and logout.jsp are excluded from filter.

    Code:
    <intercept-url pattern="/login.jsp" filters="none" />
    <intercept-url pattern="/fail.jsp" filters="none" />
     <intercept-url pattern="/**" access="ROLE_USER" />
    right now i do not have enough time to explain in details

    for more information please read spring security reference manual.

    Comment


    • #3
      Thank you Rajesh !

      Comment

      Working...
      X