• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 846
  • 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.
1 Solution
Loganathan NatarajanLAMP DeveloperCommented:
can you post the code?
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

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