javascript - Redirect to the same page but with a message in it -


I am creating a login page in JSP. I have a index.jsp page where the form exists and there are some JavaScript scripts. In the connectivity and database for the database, the username and password check is done in check1.jsp file

My issue is that the user name And after entering the password, when I press the login button, I have linked the I code with the form check1.jsp , if the user name and password match and exist, then this welcome .jsp redirects to , but if the user name does not exist or is found If not received then I'm returning a small message below the index.jsp box that the username does not exist or does not match the password , the current I'm just redirecting the index to Jsp .

How do I show the appropriate short message below the login box on the same index.jsp page?

index.jsp? Message = & lt; Redirects for your custom message

And then you can check if the message parameters are set and get them through the GET parameter

< Strong> edit: (after comments)

I am not a Java programmer but googling gives me this,

  if (request .getParameter ("message") == faucet) {// user is first opened index.jsp (no redirect)} other {// user check 1.jsp string message = Request.getParameter ("message") has been redirected to; // do anything with the message}    

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -