Answer to Question #493 in Java | JSP | JSF for sheeta sharma

Question #493
I have a problem with jsp. I am developing login.jsp. in this all the code of login is written. If username and password is in database then ok, it is running, but I want to print "invalid login" when username & password doesn't match with that of database. How can I do this?
1
Expert's answer
2010-07-23T12:00:56-0400
Let there variable "isLogin" in jsp code, that contains true if username and password match with that of database and "username" contains user name entered.<%
if ( isLogin ) {
%>
Hello, <%= username %> <%
} else {
%>
Invalid login <%
}
%>

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS