68 379
Assignments Done
98,5%
Successfully Done
In November 2018

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?
Expert's answer
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 first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions