w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to display alert or alerting user that username already exists

You should put this into a request parameter and pass (forward / include - you should try which fits best) it to the JSP page.

It would be something like this:

if (user.equals(unm)){
    request.setAttribute("error", "User Name Already Exists.");
    request.getRequestDispatcher(request.getContextPath() +
"/FizzLinkRegister.jsp").forward(request, response);

On the JSP page, you then check if the attribute "error" is set and render the JavaScript part.

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.