从http://jczghost.iteye.com/blog/812346学到的,以前虽然从书本上看到,但是例子复杂了,看jczghost简单明了。运行可能会要把tomcat的jar包加进来。可能参考原作者的文章。