0

I am trying to authenticate with spring security with form login.

I am using custom authentication. It was working perfectly when my system has Java 1.8. Recently I have upgraded Java 1.8 to 1.10, Then onwards form is not submitting. I am getting below error.

 This www.act.com page can’t be found
 No webpage was found for the web address: www.act.com/appname/login
 HTTP ERROR 404

Below is my login form.

    <form class="smart-form client-form"  name ="login" id="login-form" 
                        accept-charset="UTF-8"  role="form" method="post">
                        <header> Log In </header>

                        <fieldset>
                            <section> <label class="label">User Name</label> <label
                                class="input"> <i class="icon-append fa fa-user"></i> <input
                                type="text" name="username" id="uname"/> <b
                                class="tooltip tooltip-top-right"><i
                                    class="fa fa-user txt-color-teal"></i> Please enter username</b></label> </section>

                            <section> <label class="label">Password</label> <label
                                class="input"> <i class="icon-append fa fa-lock"></i> <input
                                type="password" name="password" id="pw" /> <b
                                class="tooltip tooltip-top-right"><i
                                    class="fa fa-lock txt-color-teal"></i> Enter your password</b>
                            </label>

                            </section>
                             <input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>

                        </fieldset>
                        <footer>
                        <button type="submit" class="btn btn-primary btn-lg">Sign in</button>

I am appending action while submitting the form in jquery.

  $('#login-form').attr('action',"login");

Any one have suggestions. It would be appreciated for your help.

10
  • Hi, Thanks for you response. It's there as hidden parameter. The same code is working with java 8. Oct 4, 2018 at 10:14
  • You mean I have to send JSESSIONID manually. Oct 4, 2018 at 10:33
  • Are you sure your server running without any error?
    – Sumesh TG
    Oct 4, 2018 at 10:39
  • Yes server is running and added input type hidden with name of JSESSIONID and values is <%= session.getId()> still i am getting same error mentioned above. Oct 4, 2018 at 11:06
  • Please check your configuration.The login url should be permitAll and turn off the csrf temporarily
    – Sumesh TG
    Oct 4, 2018 at 11:10

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.