jsp验证码怎么引用?我有一个验证码页面,怎么在另一个页面进行引用?

解决方案 »

  1.   

    http://www.javaeye.com/topic/205109
     参考
      

  2.   

    验证码其实就是返回一个图片,要引用这个验证码,只需要img标签,将src指向验证码的url就可以了
      

  3.   

    使用img标签,将src指向验证码的url页面就可以了!
      

  4.   

     <tr><td>验证码</td><td><input name="authCode" size=5><img src="../login/AuthenticationCode" alt=验证码 id=authCodeID></td><td></td></tr>
       <!-- 验证码  --> 
      <servlet>
        <description>This is the description of my J2EE component</description>
        <display-name>This is the display name of my J2EE component</display-name>
        <servlet-name>AuthenticationCode</servlet-name>
        <servlet-class>com.city.sxzlc.servlet.AuthenticationCode</servlet-class>
      </servlet>   <!-- 验证码     mapping  --> 
      <servlet-mapping>
        <servlet-name>AuthenticationCode</servlet-name>
        <url-pattern>/login/AuthenticationCode</url-pattern>
      </servlet-mapping>
    这是我的程序里的代码,直接给你复制过来了,路径的写法,按照你自己的来