二 调用验证码的方法
package com.sorfteem.informationsystem.until;import java.io.IOException;
import java.io.PrintWriter;import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;public class CheckNumber extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
        doPost(request,response);}public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
             HttpSession session=request.getSession();
             if (session!=null) {
String myrnd=RndImage.random();
System.out.println(myrnd+"<<<<<<<<<<<<<<<");
session.setAttribute("rnd", myrnd);
response.setContentType("image/jpeg");
RndImage.ImageOut(myrnd,response.getOutputStream(),80,20);
}}}三:登陆页面的JSp
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"><title>企业信息管理系统 - 登录</title><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="企业,信息,管理">
<meta http-equiv="description" content="企业信息管理系统 - 登录窗口">
<meta http-equiv="Content-Type" content="text ml; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="css/styles.css">
<script language="javascript">
function validLogin(theform) {
var username = theform.username.value;
var password = theform.password.value;
var code=theform.code.value;
if (username == "") {
    alert("用户名不能为空!");
return false;
}
if (password == "") {
    alert("密码不能为空!");
return false;
}
if(code == ""){
alert("验证码!");
return false;
}
return true;
}
</script>
</head>
<body bgcolor="#52BDFE">
<table height="100%" width="100%">
<tr>
<td align="center">
<table width="572" height="307" background="images/login.jpg">
<tr>
<td width="60%"></td>
<td>
<form name="form1" action="WelcomeServlet" method="post"
onsubmit="return validLogin(this);">
<table>
<tr>
<td>
用户名:
</td>
<td>
<input type="text" name="username" size="10">
</td>
</tr>
<tr>
<td>
密&nbsp;&nbsp;码:
</td>
<td>
<input type="password" name="password" size="10">
</td>
</tr>
<tr>
<td>
<img id="rnd" src="/InformationSystem/CheckNumber" border="0"/>
</td>
<td>         <input type="hidden" name="rnd" value='<%=request.getAttribute("rnd")+"1234" %>'/>
<input name="code" type="text" size="4" />
</td>
</tr>
<tr>
<td colspan="2">
<a href="register.jsp">注册新用户</a>
<input type="submit" name="submit" value="登录系统">
</td>
</tr></table>
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
< ml>请问怎么把二 调用验证码的方法
 里面的rnd 值传递到 login页面里的 <input type="hidden" name="rnd" value='<%=request.getAttribute("rnd")+"1234" %>'/>