下载jsp项目

I have jsp from server-side. When i make ajax call with jquery from client-side there is response with empty spaces which is generated by scriptlet from JSP.

JSP in its turn connects to database and retrieves login if exists and sends response - a single word.

If there is no such row it does not do anything, so the response is almost empty (when I say empty I mean there are empty spaces, tabs and line drops).

So how to remove those absolutely empty spaces in response.

The code is

  <!DOCTYPE html>
   <html>
   <head>
   <script src="js/jquery.min.js"></script>
<script>
i = 0;
$(document).ready(function(){
$("input").keyup(function(){
    $.post("checkLogin.jsp",
            {
              login: $('input').val(),

            },
            function(data,status){
                    $('#error').html(data.length);
            });
 });
 });
 </script>
</head>
<body>

 Enter your name: <input id='input' type="text">

 <p style="background-color: red;" id="error"></p>
 </body>
 </html>`

Try to use Maven, once run it will install all the required dependencies in your .m2(C:\Users\username) folder.

You can use the following for your reference.

http://www.mkyong.com/maven/how-to-install-maven-in-windows/

http://www.mkyong.com/maven/where-is-maven-local-repository/