• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 840
  • Last Modified:

jsp login error message to be displayed

i have a login,jsp and the servlet check_loginservlet checks whether the user is valid or invalid. In case of invalid login i want it to directed to login.jsp itself but with error message displayed. What is the way to do it.
0
SunScreenCert
Asked:
SunScreenCert
1 Solution
 
Loganathan NatarajanLAMP DeveloperCommented:
can you post the code?
0
 
Murali MurugesanFull stack Java developerCommented:
request.setAttribute("error","Invalid username or password");

forward or send  redirect to login page.

In login page , <%=request.getAttribute("error")%> - should show you the error message.

-Murali*
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now