资源简介

内含本人实例精华,一个自做PPT,动画解析cas协议,四个客户端client程序实例,一个server端程序,N个文档以及所有xml文件。配套讲解博客地址: [置顶] SSO单点登录系列3:cas-server端配置认证方式实践(数据源+自定义java类认证) http://blog.csdn.net/ae6623/article/details/8851801 [置顶] SSO单点登录系列2:cas客户端和cas服务端交互原理动画图解,cas协议终极分析 http://blog.csdn.net/ae6623/article/details/8848107 目 录 1 引言 4 1.1 摘要 4 1.2 范围 4 1.3 读者对象 4 1.4 关键词 4 2 技术背景 4 3 CAS单点登录简介(针对实践选择的技术) 5 3.1 技术快速使用说明 5 3.1.1 设置服务器域名 5 3.1.2 生成证书(这里采用JDK自带的工具keytool) 5 3.1.3 为客户端JVM导入证书 6 3.1.4 将证书应用到Web服务器Tomcat 7 3.1.5 部署CAS服务器 7 3.1.6 深入配制CAS服务器 7 3.1.7 配制CAS客户端 8 3.1.8 用到的jar包 8 3.1.9 CAS深入研究 8 4 开发环境的配置 8 5 运行环境的配置 9 6 结束语 9 7 参考文献 9

资源截图

代码片段和文件信息

/**
 * Project Name:client2
 * File Name:Query.java
 * Package Name:servlet
 * Date:2013-4-9下午04:22:22
 * Copyright (c) 2013 riambsoft All Rights Reserved.
 *
 */

package servlet;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import net.sf.json.JSONArray;

/**
 * ClassName:Query 
 Function: TODO ADD FUNCTION. 
 Reason: TODO ADD REASON. 
 Date: 2013-4-9 下午04:22:22 

 * 
 * @author Administrator
 * @version
 * @since JDK 1.5
 * @see
 */
public class Query extends HttpServlet {

    /**
     * The doGet method of the servlet. 

     * 
     * This method is called when a form has its tag value method equals to get.
     * 
     * @param request
     *            the request send by the client to the server
     * @param response
     *            the response send by the server to the client
     * @throws ServletException
     *             if an error occurred
     * @throws IOException
     *             if an error occurred
     */
    public void doGet(HttpServletRequest request HttpServletResponse response) throws ServletException IOException {

        doPost(request response);
    }

    /**
     * The doPost method of the servlet. 

     * 
     * This method is called when a form has its tag value method equals to post.
     * 
     * @param request
     *            the request send by the client to the server
     * @param response
     *            the response send by the server to the client
     * @throws ServletException
     *             if an error occurred
     * @throws IOException
     *             if an error occurred
     */
    public void doPost(HttpServletRequest request HttpServletResponse response) throws ServletException IOException {

        request.setCharacterEncoding(“utf-8“);
        response.setContentType(“text/html;charset=utf-8“);
        PrintWriter out = response.getWriter();

        String action = request.getParameter(“action“);

        List users = new ArrayList();
        users.add(“1:刘振宇1“);
        users.add(“2:刘振宇2“);
        users.add(“3:刘振宇3“);

        System.out.println(“进入系统,开始传输数据“);
        System.out.println(“users“ + users);
       // JSONArray arr = JSONArray.fromobject(users);

        //System.out.println(“arr:“ + arr);

        //out.write(arr.toString());

        out.write(“1“);
        
        out.flush();
        out.close();
    }

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件   35588261  2013-04-26 10:55  程序\casServer.rar

     文件        362  2013-04-12 13:50  程序\client1\.classpath

     文件        294  2013-04-12 13:50  程序\client1\.mymetadata

     文件       1225  2013-04-12 13:54  程序\client1\.project

     文件        330  2013-04-12 13:50  程序\client1\.settings\org.eclipse.jdt.core.prefs

     文件       2129  2013-04-12 13:56  程序\client1\WebRoot\index.jsp

     文件     232651  2013-04-09 16:12  程序\client1\WebRoot\js\jquery-1.6.js

     文件         39  2013-04-12 13:50  程序\client1\WebRoot\meta-INF\MANIFEST.MF

     文件        381  2013-04-12 13:50  程序\client1\WebRoot\WEB-INF\web.xml

     文件        752  2013-04-09 16:04  程序\client2\.classpath

     文件        294  2013-04-09 14:22  程序\client2\.mymetadata

     文件       1280  2011-05-18 15:32  程序\client2\.project

     文件        330  2011-05-18 15:22  程序\client2\.settings\org.eclipse.jdt.core.prefs

     文件       2771  2013-04-09 17:08  程序\client2\src\servlet\Query.java

     文件       1165  2013-04-09 16:21  程序\client2\src\servlet\UserServlet.java

     文件       3248  2013-04-25 09:45  程序\client2\WebRoot\index.jsp

     文件     232651  2013-04-09 16:12  程序\client2\WebRoot\js\jquery-1.6.js

     文件         36  2011-05-18 15:22  程序\client2\WebRoot\meta-INF\MANIFEST.MF

     文件       1975  2013-04-25 20:10  程序\client2\WebRoot\WEB-INF\classes\servlet\Query.class

     文件       1864  2013-04-25 20:10  程序\client2\WebRoot\WEB-INF\classes\servlet\UserServlet.class

     文件      57798  2011-05-18 15:23  程序\client2\WebRoot\WEB-INF\lib\cas-client-core-3.1.3.jar

     文件      57444  2013-04-09 15:06  程序\client2\WebRoot\WEB-INF\lib\casclient.jar

     文件      52915  2011-05-19 13:36  程序\client2\WebRoot\WEB-INF\lib\commons-logging-1.1.jar

     文件     148490  2013-04-09 16:04  程序\client2\WebRoot\WEB-INF\lib\json-lib-2.2.3-jdk15.jar

     文件    2949500  2011-05-23 09:51  程序\client2\WebRoot\WEB-INF\lib\spring.jar

     文件       2415  2013-04-16 10:06  程序\client2\WebRoot\WEB-INF\web.xml

     文件       1075  2013-04-11 11:25  程序\client3\.classpath

     文件        294  2013-04-09 14:22  程序\client3\.mymetadata

     文件       1280  2011-05-19 10:48  程序\client3\.project

     文件        330  2011-05-19 10:46  程序\client3\.settings\org.eclipse.jdt.core.prefs

............此处省略92个文件信息

评论

共有 条评论