资源简介
内含本人实例精华,一个自做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\.myme
文件 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\me
文件 381 2013-04-12 13:50 程序\client1\WebRoot\WEB-INF\web.xm
文件 752 2013-04-09 16:04 程序\client2\.classpath
文件 294 2013-04-09 14:22 程序\client2\.myme
文件 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\me
文件 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.xm
文件 1075 2013-04-11 11:25 程序\client3\.classpath
文件 294 2013-04-09 14:22 程序\client3\.myme
文件 1280 2011-05-19 10:48 程序\client3\.project
文件 330 2011-05-19 10:46 程序\client3\.settings\org.eclipse.jdt.core.prefs
............此处省略92个文件信息
相关资源
- 16款java游戏源码
- 计算机网络大作业_CSMA-CD协议退避算法
- CMPP协议的简单实现(只实现connect和
- 基于TCP/IP协议聊天室的课程设计报告
- 用Java实现对IP/TCP协议数据包的拦截和
- java使用udp协议和硬件进行数据收发处
- 电脑-Android手机之间TCP协议局域网文件
- 使用sftp协议上传文件名中文乱码解决
- 滑动窗口协议模拟 JAVA.zip
- 基于UDP协议的数据包收发程序代码+报
- Shiro安装需要jar包
- cas-client-java-2.1.1.zip
- syslog协议发送日志java
- java实现基于UDP协议的简单聊天室,带
- 单点登录sso的原理与java实现详细讲解
- Java基于UDP传输协议的简单聊天室
- Java,使用UDP协议实现CS通信
- Smpp协议 客户端和服务端
- rtx单点登录(JAVA实现)
- SIP测试软件
- iso8583协议的java实现
- \“java实现简单的单点登录\“源码包
- C#下基于POP3和SMTP协议的邮件收发归档
- GBN网络协议模拟测试
- 呕心沥血的java复杂聊天室(包括自定
- rip协议 java实现
- dlt645-2007电能表协议解析源码+串口编
- 基于javaf808协议网关模拟器
- PHP缩写的cmpp2.0协议改造
- Socket服务端客户端以tcp/ip协议发送接
评论
共有 条评论