摘要: import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.RandomAccessFile; import java.nio.ByteBuffer; import jav... 阅读全文
posted @ 2014-04-17 20:55 wasp 阅读(2173) 评论(0) 推荐(0) 编辑
摘要: 目录1 介绍1.1 为什么要有编码规范1.2 版权声明2 文件名2.1 文件后缀2.2 常用文件名3 文件组织3.1 Java源文件3.1.1 开头注释3.1.2 包和引入语句3.1.3 类和接口声明4 缩进排版4.1 行长度4.2 换行5 注释5.1 实现注释的格式5.1.1 块注释5.1.2 单行注释5.1.3 尾端注释5.1.4 行末注释5.2 文挡注释6 声明6.1 每行声明变量的数量6.2 初始化6.3 布局6.4 类和接口的声明7 语句7.1 简单语句7.2 复合语句7.3 返回语句7.4 if,if-else,if else-if else语句7.5 for语句7.6 whil. 阅读全文
posted @ 2013-06-18 21:53 wasp 阅读(3672) 评论(0) 推荐(0) 编辑
摘要: http://doc.javanb.com/spring-framework-reference-zh-2-0-5/7.5.使用ProxyFactoryBean创建AOP代理 - Spring Framework reference 2.0.5 参考手册中文版7.5.使用ProxyFactoryBean创建AOP代理如果你正在使用Spring IoC容器(即ApplicationContext或BeanFactory)来管理你的业务对象--这正是你应该做的--你也许会想要使用Spring中关于AOP的FactoryBean。(记住使用工厂bean引入一个间接层之后,我们就可以创建不同类型的对象 阅读全文
posted @ 2013-06-18 21:15 wasp 阅读(7707) 评论(0) 推荐(0) 编辑
摘要: Java httpclient 模拟NTLM域登录Posted on 2013 年 4 月 29 日 by youthfliesNTLM是NT LAN Manager的缩写,是微软windows系统的一种登录认证机制,常用做域内主机的自动认证。为了方便管理,公司、学校等,都会要求接入内部网的电脑加入域,用户的登录名、密码都保存在域中服务器上。简单来说,当用户需要登录系统时,服务器返回401需要进一步授权,然后浏览器和服务器进行协商,确认NTLM版本等内容,然后服务器会随机产生一个字符串(叫做挑战,challenge),发给本机,本机会使用保存在本地域中的用户名和密码对其加密,然后将密文发送给服 阅读全文
posted @ 2013-05-05 21:40 wasp 阅读(2429) 评论(1) 推荐(0) 编辑
摘要: //这是什么含义 SET NO_BROWSETABLE ON declare @P1 int set @P1=1 exec sp_prepare @P1 output, NULL, N 'SELECT * FROM ALLSum ', 1 select @P1 解释:设置的东西就不说了,看联机帮助就知道是什么意思了 declare @P1 int --set @P1=1 --这个是不要的,是执行下面的语句后产生的 --创建一个调用指定sql语句的指针,并且保存到变量@p1中 exec sp_prepare @P1 output, NULL, N... 阅读全文
posted @ 2012-07-26 23:49 wasp 阅读(3940) 评论(0) 推荐(0) 编辑
摘要: Bootstrapping TomcatThe bootstrapping process is actually rather simple. All we have to do is:1、Set up the environment variables required by this Tomcat instance2、Instantiate the general class loaders that will be used for our running Tomcat instance3、Initialize this Tomcat instance4、Parse the main 阅读全文
posted @ 2012-07-15 17:02 wasp 阅读(594) 评论(0) 推荐(0) 编辑
摘要: 配置位置在log下的server.xml,(tomcat容器)在server.xml里的<host>标签下添加:<Valve className="org.apache.catalina.valves.AccessLogValve"directory="logs" prefix="localhost_access_log." suffix=".txt"pattern="common" resolveHosts="false"/>范例:<Engin 阅读全文
posted @ 2012-07-09 22:35 wasp 阅读(2807) 评论(0) 推荐(0) 编辑
摘要: Java代码 HttpClientclient=newHttpClient(); HttpMethodmethod=newGetMethod("http://www.apache.org"); try{ client.executeMethod(method); byte[]responseBody=null; responseBody=method.getResponseBody(); }catch(HttpExceptione){ //TODOAuto-generatedcatchblock e.printStackTrace(); }catch(IOException 阅读全文
posted @ 2012-07-06 22:41 wasp 阅读(10556) 评论(0) 推荐(0) 编辑
摘要: Tomcat1、下载源码,并解压文件,例如:E:\Programe\javaWorkShop\OA\Tomcat62、新建项目Java Project3、从File System中导入 4、配置source 5、添加依赖包,我都是从eclipse插件中找到主要包如下: 添加依赖后,基本上错误都消失6、copy 文件:build.properties.default。并修改名称为build.properties,修改配置项:base.path=E:/Programe/javaWorkShop/OA/Tomcat6/share7、打开ant视图,打开build.xml 执行download。会下载 阅读全文
posted @ 2012-07-01 21:13 wasp 阅读(3903) 评论(1) 推荐(0) 编辑
摘要: 学习Tomcat的相关资料1、how to tomcat work这本书解剖了Tomcat4.1.12和5.0.18版本,解释了它的servlet容器的内部运行机制英文版 中文版2、Tomcat 6 Developer’s Guide.pdfThis book intended to provide Tomcat administrators, deployers, and developers an introduction into the internal workings of the Tomcat servlet container.At the same time, it prov 阅读全文
posted @ 2012-07-01 18:48 wasp 阅读(783) 评论(0) 推荐(0) 编辑