- 博客(17)
- 收藏
- 关注
简单的Spring AOP
[code="java"] [/code][code="java"]package com.jesse.spring.simple.service.impl;import org.apache.log4j.Logger;import com.j...
2013-10-26 03:38:31 104
索引中丢失IN或OUT参数issue解决方案
今天试了试原生jdbc insert操作,oracle数据库。出现错误如下[code="java"] INFO [main] (ConnectionPool.java:98) -Connection created successfully! INFO [main] (ConnectionPool.java:54) -create pool [Sun Oct 13 22:30:30 C...
2013-10-13 22:44:35 287
Java多线程for beginner
[code="java"]public class Multi { public static void main(String args[]) { Thread t1 = new MyThread("Steve"); Thread t2 = new MyThread("Jesse"); t1.start(); t2.start(); }}c...
2013-10-13 04:58:58 110
原创 log4j日志输出到web项目指定文件夹
尝试将log4j的文件日志输出到web工程制定目录,遇到了很多问题,最终搞定,下面是记录。 其原理在于log4j的配置文件支持服务器的vm的环境变量,如${oss.log4j.path},在log4j加载配置文件之前,先用System.setProperty("", "")设置好日志文件路径,这一操作通过一个初始的servlet来实现1. log4j.properties...
2013-10-07 01:36:31 691
原创 关于在页面得到的servlet验证码总是上一次保存在session中的
在网上找到一份servlet产生验证码的代码,经过测试,发现在页面通过session.getAttribute()方法得到的验证码总是上一次保存在session中的,这样,它总比页面实际的验证码晚一拍。网上一种说法是session早于页面加载。多数人解决方法是用一个中间页面,或者一个servlet来比较输入的验证码是否是session中保存的验证码来解决的,也有通过ajax异步加载来解决的,本人通...
2013-10-06 22:11:31 565 1
原创 JavaMail发送邮件
JavaMail发送邮件,已经过测试1. OssMailSenderInfo类,包含需要发送的邮件信息,包括发送者和接收者的信息[code="java"]package com.jesse.onlineshop.util;import java.util.Properties;public class OssMailSenderInfo { private ...
2013-10-06 03:33:23 217
原创 eclipse导入rt包问题
copy了一份别人写的生成验证码的servlet,却发现编译时不能通过,提示找不到sun.image.codec.jpeg.JPEGCodec和com.sun.image.codec.jpeg.JPEGImageEncoder。其servlet如下。最后,通过将jre lib目录下的rt.jar拷贝到工程,然后引入,得以通过。[code="java"]package com.jesse.o...
2013-10-06 01:59:32 399
原创 关于Servlet是否单例
实在不知道servlet是否单例的,于是乎,做了一个小小的测试,不知道这样测试是否准确,望大牛指正。感激!1. 写了一个servlet[code="java"]public class IsSingletonServlet extends HttpServlet { private static final long serialVersionUID = 48516780508...
2013-10-06 01:07:52 257
Code Pieces
[code="java"] public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } ...
2013-07-16 00:16:43 83
Need Help! Issues in resteasy & spring
[b] FYI: Just using resteasy to access the service layer, which returns xml, then using xslt to translate it for view. But... issues below If you can fix it, pls let me known kindly. Regards!...
2013-07-14 04:20:40 74
Weekly Vocabulary
[code="java"]concatenate 连接furthermore 此外handy 便利的, 容易取得的, 敏捷的ingredient 成分,因素idiom 成语,方言,惯用语法jargon 专门术语,梦话,行话plural 复数的, 复性的, 两个以上的retrieve 检索,重新得到,使恢复similarly 同...
2013-07-13 04:44:52 131
Auto increasing id within oracle
[color=blue] 1. Create table:[/color][code="java"]declare num number;begin select count(*) into num from all_tables where table_name=upper('eric_emp_tbl') and owner=upper('eric');...
2013-07-13 04:16:11 84
POM ref from company
[code="java"] 4.0.0 com.eric pet 1.0 pom pet http://maven.apache.org UTF-8 4.10 3.0.5.RELEASE 2.1 1.7.0 junit junit ${junit.ve...
2013-07-12 23:37:49 124
pdf and maven
[color=green] For writing pdf, download the jar file, and install it to local by commands below.[/color][code="java"]mvn install:install-file -DgroupId=com.martin -DartifactId=itextpdf -Dversio...
2013-07-12 23:27:09 90
log4j configuration
[code="java"]log4j.rootLogger=INFO, D#MAIL ----- PASS TEST-----#--------------------------------------------------------------#log4j.appender.mail=org.apache.log4j.net.SMTPAppe...
2013-07-12 23:01:16 174
Spring EL
[color=blue] Biz I'm a junior in the fantastic world of java, all these drips are ref from tutorials. And if someone asks me how or why it should be, I will smile a bitter smile. This article is...
2013-07-12 22:50:51 85
DB configuration with properties file
[color=blue] Biz I'm a junior in the fantastic world of java, all these drips are ref from tutorials. And if someone asks me how or why it should be, I will smile a bitter smile. This article is...
2013-07-12 22:40:21 78
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人