01 2013 档案

摘要:Due to the popularity of my prior posts on processing SAML using OpenSAML I put together this code that shows a more real-world-example of how you would setup an HttpServlet to sit and listen for SAML Responses that are posted to it. Then it just shows what you might do with the Response to get what 阅读全文
posted @ 2013-01-30 22:21 许仙儿 阅读(5981) 评论(0) 推荐(0) 编辑
摘要:公司做HW外包,每行代码都要经过checkstyle,重复,圈复杂度的各种考验,而检测工具包含篡改过的第三方,或HW的DIY。公司的同事在各种规则下,也找到了各种应对方法。昨天发现项目一个Bug,Debug后发现如下代码段(非原码,仅示例) 1 public static Object errExample(byte[] bytes){ 2 Object obj = null; 3 ObjectInputStream ois; 4 try { 5 ByteArrayInputStream bis = new ByteArr... 阅读全文
posted @ 2013-01-27 14:20 许仙儿 阅读(238) 评论(0) 推荐(0) 编辑
摘要:package com.chinasoft.xuzs.portal;public class ActivateTest { /** * 根据传入的Request,生成对应的Response * @param request * @return */ public Response createResponse(Request request) { // 简单初始化Response,防止空指针 Response response = new Response(); // 保证构造的Response无误 ... 阅读全文
posted @ 2013-01-24 00:32 许仙儿 阅读(327) 评论(0) 推荐(0) 编辑
摘要:简单的替换操作,基本不需引jar包。首先写一个工具类。package xuzs.servlet;import java.io.BufferedReader;import java.io.ByteArrayOutputStream;import java.io.FileNotFoundException;import java.io.FileReader;import java.io.IOException;import java.io.StringReader;import javax.xml.parsers.DocumentBuilder;import javax.xml.parsers.D 阅读全文
posted @ 2013-01-12 01:46 许仙儿 阅读(530) 评论(0) 推荐(0) 编辑
摘要:package xuzs.servlet;import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import javax.servlet.ServletException;import javax.servlet.http.HttpServlet;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;public class ReceiveSe 阅读全文
posted @ 2013-01-09 01:09 许仙儿 阅读(663) 评论(0) 推荐(0) 编辑
摘要:To logout an user from the SP an LogoutRequest is sent. The data needed about the user is the SessionIndex and NameID from the data recived at login. I my case in the Assertion in the Artifact Resolve Response.//IPR Ergogroup ASpublic static void doSynchronousLogout(final HttpSession sessionToLogout 阅读全文
posted @ 2013-01-07 17:26 许仙儿 阅读(1182) 评论(0) 推荐(0) 编辑
摘要:近日心情不爽,项目做烦了,就不想做项目了,停了下来,想做些JavaMail的开发。 上网看了些教程,发现网上的文章虽然很多,但大都有些问题,包括:有些文章写得很全,但感觉太纷繁复杂,没有个提纲,感觉很乱。有些文章没有把问题写全,对于很多情况,程序能运行,但邮件就是发不了。 对于JavaMail,最基础的功能就是邮件的发送和接收,在这里,我先讲一讲邮件的发送。 在写具体的程序前,先讲一些概念。1.邮件的发送:如果你的邮件地址是a@host.com,而你要用这个邮箱发送一封邮件到to@tohost.com,这个发送过程是怎样的呢,你以为是先连接到tohost.com这服务器上,然后把邮件... 阅读全文
posted @ 2013-01-04 22:54 许仙儿 阅读(457) 评论(0) 推荐(0) 编辑
摘要:Equal, Greater or Less ThanAs well as the familiar equals sign (=) it is also very useful to show if something is not equal to (≠) greater than (>) or less than (<)These are the important signs to know:=If two values are equal, we use the "equals" signexample:2+2 = 4≠If two values ar 阅读全文
posted @ 2013-01-01 11:52 许仙儿 阅读(428) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示