Sample download, install deployment, and run Guide for Web SSO:

Source: Internet
Author: User
The Web-sso sample is made up of three standard web applications, compressed into three zip files and downloaded from the http://gceclub.sun.com.cn/wangyu/web-sso/. where Ssoauth (Http://gceclub.sun.com.cn/wangyu/web-sso/SSOAuth.zip) is the identity authentication Service; SSOWEBDEMO1 (http://gceclub.sun.com.cn/ Wangyu/web-sso/ssowebdemo1.zip) and SSOWebDemo2 (http://gceclub.sun.com.cn/wangyu/web-sso/ Ssowebdemo2.zip) is a two Web application for demonstrating single sign-on. These three web applications are not made into war packages because they cannot be deployed directly, and a small change is needed to make a user's deployment environment. The sample deployment and operation environment has certain requirements, need to meet Servlet2.3 above standard Java container to run (such as Tomcat5,sun application Server 8, Jboss 4, etc.). In addition, the identity authentication Service requires a JDK1.5 operating environment. The reason to use JDK1.5 is because the author uses a thread-safe, High-performance Java Collection Class "Concurrentmap", only in JDK1.5. These three web applications can be deployed individually, and they can be deployed separately on different machines, different operating systems, and different Java EE products, and they are entirely standard platform-independent applications. However, there is a limitation that the domain names of the two deployed applications (DEMO1, DEMO2) need to be the same, which in later chapters will explain the relationship between cookie and domain and how to make a cross-domain Web-sso decompression ssoauth.zip file in/web-inf/ In Web.xml, modify the properties of DomainName to reflect the actual deployment, DomainName need to set the domain name of the two single sign-on applications (Demo1 and Demo2). This domainname is not related to the domain name of the machine that the current Ssoauth service deploys. My default setting is ". Sun.com". If you deploy DEMO1 and Demo2 machines without domain names, enter the IP address or hostname (such as localhost), but using an IP address or hostname means that demo1 and demo2 need to be deployed to a single machine. After Setup, depending on the Java container you choose, you may want to compress the Ssoauth directory into a war file. Use"JAR-CVF Ssoauth.war ssoauth/" can complete this function. Extract SSOWebDemo1 and SSOWebDemo2 files, locate web.xml files under their/web-inf/, and modify several of the initialization parameters
<init-param>
<param-name>SSOServiceURL</param-name>
<param-value>http://wangyu.prc.sun.com:8080/SSOAuth/SSOAuth</param-value>
</init-param>
<init-param>
<param-name>SSOLoginPage</param-name>
<param-value>http://wangyu.prc.sun.com:8080/SSOAuth/login.jsp</param-value>
</init-param>
Modify the Ssoserviceurl and ssologinpage into the machine name, port number, and root path (by default, Ssoauth) to deploy the Ssoauth application to reflect the actual deployment. After Setup, depending on the Java container you choose, you may need to package the SSOWebDemo1 and SSOWebDemo2 directory compression into two war files. Use "JAR-CVF Ssowebdemo1.war ssowebdemo1/" to complete this function. Please enter the test URL (test.jsp) for the first Web application, such as http://wangyu.prc.sun.com:8080/SSOWebDemo1/test.jsp, which will automatically jump to the login interface if it is first accessed, as shown in the following figure

Log in with one of the three accounts (for example, username: Wangyu, Password: Wangyu), and you will be able to successfully see the test.jsp content: Display the current username and welcome information.
Please then enter the test URL (test.jsp) for the second Web application in the same browser, such as http://wangyu.prc.sun.com:8080/SSOWebDemo2/test.jsp. You will find that you can see the test.jsp content without having to log on again, also displaying the current username and welcome information, and the welcome information explicitly displays the current application name (DEMO2).

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.