<%@ page language="java"
pageEncoding="UTF-8"%>
<%@ page
import="java.awt.*,java.awt.image.*,com.sun.image.codec.jpeg.*,java.util.*"
%>
<%@ taglib
http://struts.apache.org/tags-bean">http://struts.apache.org/tags-bean"
prefix="bean"
%>
<%@ taglib
http://struts.apache.org/tags-html">http://struts.apache.org/tags-html"
prefix="html"
%>
<%@ taglib
http://struts.apache.org/tags-logic">http://struts.apache.org/tags-logic"
prefix="logic"
%>
<%@ taglib
http://struts.apache.org/tags-tiles">http://struts.apache.org/tags-tiles"
prefix="tiles"
%>
<!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01
Transitional//EN">
<html:html
lang="true">
<meta http-equiv="pragma"
content="no-cache">
<meta
http-equiv="cache-control"
content="no-cache">
<meta http-equiv="expires"
content="0">
<meta http-equiv="keywords"
content="keyword1,keyword2,keyword3">
<meta http-equiv="description"
content="This is my page">
<!--
<link rel="stylesheet"
type="text/css"
href="styles.css">
-->
<h3>在jsp页面生成验证码</h3>
<hr/>
<%
%>
</html:html>
--将该文件保存为pic.jsp,该文件负责生成图片!如果要在其他的页面显示该图片只需要写上
<img
src="pic.jsp"/>
仅此一句就ok了,适用于生成各种验证码!