Java enables single sign-on with domain

Source: Internet
Author: User
Tags set time

The technology used:

Ssm

Mysql

Maven

Tomcat8.0

The same domain single sign-on detailed steps are as follows:

1. First write a login interface (hidden field is a staging address)

    

2. Determine if the user's password is correct, add a cookie correctly, or return to the error page

3. Write the Login Check interface

    

4. Write two of the same domain applications

    

    

Cookie does not set time default browser off disappears

Effect implementation steps:

1. Open two browsers

2. Access to Demo1 and Demo2

3. The login screen will be entered at this time because no login

4. Login Demo1

5. Go to Demo2 Refresh page

At this time found that Demo2 is not logged into the main interface, the same domain single sign-on to achieve success.

  

  

Java enables single sign-on with domain

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.