Use PrintWriter to control front-end popups in the back-end

Registration and verification, after the user information is transmitted from the front-end to the back-end using the [form] , perform database search and verification, if the user already exists, the front-end interface will pop up, and ajax may not be applied

PrintWriter out = response.getWriter();
             out .flush();
             out .println( "<script>" );
             out .println( "alert('This username already exists, please re-enter!');" );
             out .println( "history.back();" );
             out .println( "</script>" );

Leave a Comment

Your email address will not be published. Required fields are marked *