jsp验证码问题
<%
if (rand.equals(input)) {
response.sendRedirect("hello.jsp"); %>
<%
} else {
%>system.out.println("验证码错误!");<%
response.sendRedirect("hello_input.jsp");
}
%>
源程序如上,是登陆界面的验证程序,这是验证码部分。rand是验证码,input是输入的验证码,如果一直就跳转到hello.jsp,如果不一致先输出"验证码错误!",在跳转到hello_input.jsp。现在的问题是,验证码输入错误直接跳转到hello_input.jsp,没有提示"验证码错误!",大侠求助!