您可以
session在此处使用对象:
在
check1.jsp:
if (loginSuccess) { //redirect to welcome.jsp}else { session.setAttribute("error", "Username or Password is incorrect"); //redirect to index.jsp}在
index.jsp:
String msg = session.getAttribute("error");if (msg != null) { %><p ><%= msg %></p><%}EL和JSTL还存在其他更简单的方法,但这只是一个入门技巧。



