随笔分类 - 软件开发:Java
摘要:In order to produce the mapping tables for this book, I wrote the following Java program, GB2312Unicode.java. The output of this program is presented in the next 3 chapters. /** * GB2312Unicode.java *...
阅读全文
摘要:1.JavaBean与EJB(1)JavaBean与EJB规范在以下方面有共同的目标:通过标准的设计模式推广Java程序代码,提升开发过程和开发工具之间的重复运用性可携性.但是这两种规格的原始问题却是为了解决不同的问题.定义于JavaBean组件模型中的标准规范,被设计来产生可重复运用的组件,而这些组件通常被用于IDE开发工具,而且通常是可视化组件,当然并不一定是可视化组件.(2)EJB规范所定义...
阅读全文
摘要:文件上传在web应用中非常普遍,要在jsp环境中实现文件上传功能是非常容易的,因为网上有许多用java开发的文件上传组件,本文以commons-fileupload组件为例,为jsp应用添加文件上传功能。common-fileupload组件是apache的一个开源项目之一,可以从http://jakarta.apache.org/commons/fileupload/下载。用该组件可实现一次上传...
阅读全文
摘要:中文问题: jsp和mysql连接的时候,要在每一个jsp文件中加: 如果是表单的提交要加上: jdbc:mysql://127.0.0.1:3306/publish?useUnicode=true&characterEncoding=GBK" 和 ##########################################################...
阅读全文
摘要:产生验证码图片的文件-----image.jsp 255) fc=255; if(bc>255) bc=255; int r=fc+random.nextInt(bc-fc); int g=fc+random.nextInt(bc-fc); int b=fc+random.nextInt(...
阅读全文
摘要:A wrapper for Java's MD5 class that makes life a little easier. This class lets you produce an MD5 hashcode for some binary data. It is useful for storing passwords in databases or file systems, or f...
阅读全文