AJAX with JSP and Servlet using Jquery Example


AJAX - Asynchronous Javascript and XML, is a technology that enables web applications to behave more like desktop applications by making asynchronous calls to the server. This eliminates the process of doing a complete page refresh while we need only a small part of the page to be updated. Google's Auto Suggest is a best example for AJAX implementation. As we type our search terms in the search box, Google gives us suggestions according to the search terms we type without refreshing the page. You can read more about AJAX technology here.

AJAX is implemented using Javascript and XML. XMLHttpRequest is the object that does the job behind the scene. You can also use JSON ( Javascript Object Notation) instead of XML. In this post, I am going to demonstrate with a simple example on how to make AJAX calls from a JSP page to a Servlet using JQuery and update the same JSP page back with the response from the Servlet. In other words, this post will give you an overview on how to implement AJAX calls in Java web applications. I am using JQuery library instead of implementing this in Javascript because it is quite tedious to make it work across all browsers in Javascript and JQuery simplifies this in a single function. Here are the steps to reproduce to create a simple AJAX enabled Java Web Application using Eclipse and Tomcat 7,

1. Create a Dynamic Web Project in Eclipse. I have named it as "JQueryAjaxDemo"
2. Now right click on the Webcontent folder in the Project Explorer and create a JSP file. I have named it as "index.jsp".
3. In the index.jsp page, let us have a text box where the user will be prompted to enter his/her name and a button to display a welcome message with the name given by the user in the textbox on clicking it. Copy paste the below code in index.jsp file.

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>AJAX calls using Jquery in Servlet</title>
        <script src="http://code.jquery.com/jquery-latest.js">   
        </script>
        <script>
            $(document).ready(function() {                        
                $('#submit').click(function(event) {  
                    var username=$('#user').val();
                $.get('ActionServlet',{user:username},function(responseText) { 
                        $('#welcometext').text(responseText);         
                    });
                });
            });
        </script>
</head>
<body>
<form id="form1">
<h1>AJAX Demo using Jquery in JSP and Servlet</h1>
Enter your Name:
<input type="text" id="user"/>
<input type="button" id="submit" value="Ajax Submit"/>
<br/>
<div id="welcometext">
</div>
</form>
</body>
</html>

3. Right click on Source directory and create a new Package. Name it as "ajaxdemo".
4. Right click on Source directory and Add -> New -> Servlet and name it as "ActionServlet". In this servlet we get the name entered by the user in the jsp page and create a welcome message that includes this name. This is then returned back to the jsp page to be displayed to the user. If no name is typed by the user in the textbox, then it is defaulted to a value called "User". Copy and paste the below code in 'ActionServlet.java' file.

package ajaxdemo;

import java.io.IOException;
import javax.servlet.ServletException;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Servlet implementation class ActionServlet
 */

public class ActionServlet extends HttpServlet {
private static final long serialVersionUID = 1L;

    
    public ActionServlet() {
        // TODO Auto-generated constructor stub
    }


protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String name=null;
name = "Hello "+request.getParameter("user");
if(request.getParameter("user").toString().equals("")){
name="Hello User";
}
response.setContentType("text/plain");  
response.setCharacterEncoding("UTF-8"); 
response.getWriter().write(name); 
}


protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub

}

}


Note: If you choose to use a different name for package and servlet, provide the same name for url mapping in the deployment descriptor explained in the next step.

5. Now map the above servlet to an url pattern so that the servlet will be called whenever it matches the specified url pattern. Open web.xml file that is under WEB-INF folder and paste the below code above </web-app> tag.

<servlet>
    <servlet-name>ActionServlet</servlet-name>
    <servlet-class>ajaxdemo.ActionServlet</servlet-class>
</servlet>
<servlet-mapping>
    <servlet-name>ActionServlet</servlet-name>
    <url-pattern>/ActionServlet/*</url-pattern>
</servlet-mapping>

6. Last step is to run this project. Right Click on index.jsp and select Run on Server. Use your default web browser and avoid using internal web browser that is in-built in Eclipse. Now on the web page the user will be prompted to enter a name and on clicking the "Ajax Submit" button, the user will now see a welcome message saying "Hello (UserName)". This is all done asynchronously and you will not see a page refresh whenever the user clicks on the "Ajax Submit" button.

Code Explanation

The JQuery code written on the head section of the jsp page is responsible for the AJAX call made to the servlet and displaying the response back in the JSP page.


<script src="http://code.jquery.com/jquery-latest.js">   
</script>
<script>
            $(document).ready(function() {                       
                $('#submit').click(function(event) {  
                    var username=$('#user').val();
                 $.get('ActionServlet',{user:username},function(responseText) { 
                        $('#welcometext').text(responseText);         
                    });
                });
            });
</script>


When the user clicks on "Ajax Submit" button, button click event is fired and the 'get' function executes the Ajax GET request on the Servlet(ActionServlet in the above example). The second argument of the get function is a key-value pair that passes the input value from JSP page to Servlet. The third argument is a function that defines what is to be done with the response that is got back from the servlet. For better understanding download the source code of the above example from the below link and run it yourself with small alterations in the Servlet and JSP page.



If you want to add more dynamics and return other Java objects such as list, map, etc. as response instead of plain text then you can use JSON. I am aiming to provide a simple example for this in my upcoming post.

Updates:

Check out these posts that are written on the same topic for know more about AJAX in Java Web Applications,

AJAX with Servlets using JQuery and JSON
AJAX Fetch Data from Database in JSP and Servlet with JSONArray


Please leave your comments and queries about this post in the comment sections in order for me to improve my writing skills and to showcase more useful posts.

Subscribe to GET LATEST ARTICLES!


advertise here

Related

Jquery 2470861422481673218

Post a Comment

  1. Excellent yet simple post!! Straight to the point .. Thanks for sharing...

    ReplyDelete
  2. hi, i had problem in servlet i changed the code for this:

    response.setContentType("text/html;charset=UTF-8");
    PrintWriter out = response.getWriter();
    out.println(nMensajes);

    thank's

    ReplyDelete
    Replies
    1. Setting content type to "text/html" is just to tell the browser what type of content it is receiving as response. It depends upon the type of content you are receiving as response, so in this case it is appropriate to have "text/plain" as content type. If you are receiving some html content then it should be "text/html".

      For me the example is working perfectly fine.

      Delete
  3. you've started the jsp page with "ISO-8859-1" encoding but inside the servlet you've set the response setCharacterEncoding method as "utf-8".

    If i type "José" the characters are being badly written. how can i fix it?

    ReplyDelete
    Replies
    1. I think you have the answer in your question itself. Change the content-type attribute of the page directive to use UTF-8 instead of ISO-8859-1 and it will solve the problem. I did not care much about the character set since I was using plain text for this example and the aim is to call the servlet asynchronously.

      But that is a good catch. It is always better to use UTF-8 encoding in all the layers. I will update the code soon.

      Please do let me know whether this solved your issue. Thanks. I recommend you to read this as well if the solution above does not solve your problem,

      http://weblogs.java.net/blog/joconner/archive/2005/07/charset_traps.html




      Delete
    2. I simply removed the setContentType and setCharacterEncoding from the servlet treatment and everything works as expected. Thank you for the help Priya =)

      Delete
    3. Most Welcome! Thank you for letting know the solution that worked for you :)

      Delete
    4. thanx this code helped me.. thanx again.

      Delete
  4. Thank you so much for this code :)

    ReplyDelete
  5. I really liked your post! but I got a doubt:
    I'm trying to send by jquery all input tags of a form to a servlet using post method. Is there a way to send all input tags without specify them in the second argument of $.get function?

    e.g:
    $.post('myServlet',{}, function(data){
    alert(data);
    });

    ReplyDelete
    Replies
    1. The second argument of the post function is where the parameters are meant to be passed and it is the standard way of passing parameters when making AJAX calls using jQuery. You can pass multiple pairs of parameters separated by comma's.

      Other than that, you can pass the vales as query string to the servlet url ( first argument) you are passing. For example,

      $.post('myServlet?name=Priya&gender=female',function(data){
      alert(data);
      });

      Hope this helps!

      Delete
  6. Thank you very very much for this code !!!

    ReplyDelete
  7. hi priya,
    thank you so much for this code :),

    i am new to ajax,i want to learn ajax calls with jquery,i am using jboss server(jsp,struts or servlet),please give any suggestions to learn,
    thanks in advance,

    ReplyDelete
    Replies
    1. Hi Saran,

      This post is a simple example and you can use the same code to get started with AJAX using jquery. I have used Tomcat server here, you can use Jboss server also and deploy your project.

      This pot explains how to retrieve plain text from servlet and update the part of the web page without reloading the whole page. If you want to send more complex java objects like lists,maps etc you have to use JSON and Jquery together. Check this out, and start coding,

      http://www.programming-free.com/2012/09/ajax-with-servlets-using-jquery-and-json.html

      Hope this helps!

      Delete
    2. This helps a lot.
      Many thanks.

      Delete
  8. can i can ajax funtion in onclick event. simultaneously we need to call servlet controller to retrive data on div tag

    ReplyDelete
    Replies
    1. Yes you can make ajax calls to servlet controller on click event, you can do something like,

      $(document).ready(function() {
      $('#element_id').click(function() {
      $.ajax({
      type: 'POST',
      data: 'username=priya',
      success: function() { alert("success");},
      error: function(){ ... },
      url: '/controllerurk/',
      cache:false
      });
      e.preventDefault();
      });
      });

      Hope this helps!

      Delete
    2. Thanks... good job.


      How can i return error value from servlet page.
      Following things i need
      1.pass the value to servlet using ajax post
      $("msg").html("<img src="Loading.gif />");
      $.ajax({
      type: 'POST',
      data: 'emailid : txtEmailid, password : txtPassword',
      url: '/LoginCheck',
      cache:false,
      success: function() {
      $("msg").html("Login sucess");
      //here i need to refresh the same page
      error: function(){
      $("msg").html("Login failed");
      //here there is no refresh
      });

      i know that
      response.getWriter().write(name); here what ever returns goes to success.
      In my page may possible the user may give wrong username and password at the time what can i do. if want to handle error msg .

      another problem is when the js start loading the loading.gif is loaded while enter into the ajax function it hide it show the same page in $("msg") instead of i need same loading.gif is show until it return the value from servlet for that what can i do..


      Thanks in advance...


      Delete
  9. i have header.jsp, footer.jsp, leftpanel.jsp, rightpanel.jsp and middlebody.jsp , now i want to call servlet controller from leftpanel.jsp using ajax call. and its response should be display on division tag of middlebody.jsp . is it possible to do that? and one more thing suppose i have requestdispatcher page and we need to display that page on div tag of middlebody.jsp . how could we do? please ans if it is possible,if not then any other way to do that. actually i have tried to call servlet controller but i am confuse how to display requestdispatcher page.
    Thanks in advance

    ReplyDelete
  10. Hi Lokesh,

    I understand that you have several JSP files included in your main page. If you have included all the JSP pages in your main jsp page like this, for example, <jsp:include page="result.jsp" flush="true"/>, then all the elements in the child jsp pages will accessible in your main page.

    For example, if you make ajax call to your servlet controller on a button click that is in your leftpanel.jsp, you can update the results in the middlebody.jsp by mentioning the id of the div you want to update as shown in this post. jQuery script for making ajax calls and updating the JSP's should be written in the main page where you include all your JSP's.

    Working Example,

    index.jsp (main page)
    *********
    <html>
    <head>
    <script src="http://code.jquery.com/jquery-latest.min.js"></script>
    <script>
    $(document).ready(function() {
    $('#submit').click(function(event){
    $.get('ActionServlet',{name:'priya'},function(responseText){
    $('#content').text(responseText);
    });
    });
    });
    </script>
    </head>
    <body>
    <h1>My main page</h1>
    <jsp:include page="result.jsp" flush="true"/>
    <jsp:include page="result2.jsp" flush="true"/>
    </body>
    </html>


    result.jsp(second jsp page)
    ***********
    <html>
    <h1>This is second JSP Page:</h1>
    <input type="button" value="submit" id="submit"/>
    </html>

    result2.jsp (third jsp page)
    ***********
    <html>
    <h1>This is third jsp</h1>
    <div id="content">
    </div>
    </html>

    ActionServlet.java
    ******************
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    String name=null;
    name = "Hello "+request.getParameter("name");
    if(request.getParameter("name").toString().equals("")){
    name="Hello User";
    }
    response.setContentType("text/plain");
    response.setCharacterEncoding("UTF-8");
    response.getWriter().write(name);
    }


    In this example, when you run the index.jsp page and click on submit button that comes from the second jsp page, the div 'content' from third jsp page will be updated.

    Do not use Request dispatcher to update results,instead return json data and update html. See this link for more info,

    http://stackoverflow.com/questions/5336889/how-to-show-jsp-in-response-to-an-ajax-call-to-a-servlet

    ReplyDelete
  11. how to resolve if we get error during ajax call i.e xmlHttp status is not complete or status is 0.

    ReplyDelete
  12. I have to show map values in autocomplete box using ajax.can any one help me how to do that.

    ReplyDelete
    Replies
    1. http://www.mysamplecode.com/2011/12/jquery-autocomplete-ajax-json-example.html

      Check this out. This might help.You should use JSON library to return high level java objects like maps from servlet to JSP. Hope this helps!

      Delete
  13. good job, thank you for Share with us

    ReplyDelete
  14. I want to have a way to add JS that will affect all pages

    ReplyDelete
  15. Hi
    I am not able to run the program. Its not getting any response from the Servlet. Its not entering the ready function(inserted an alert box).
    What am i doing wrong??
    I am using J2EE 2.5 and Tomcat 6.0

    Thanks

    ReplyDelete
    Replies
    1. Have you included jQuery library in your jsp file?

      Delete
  16. And here XMLHTTPRequest object is not used......why?
    In Javascript we always obtain the object of XMLHTTPRequest.

    ReplyDelete
    Replies
    1. Hi RamMohan,

      I have not used javascript here.I have used jquery library to make AJAX calls to servlet. jQuery library internally uses XMLHttpRequest to make AJAX calls. Lines from my post for your reference,

      "I am using JQuery library instead of implementing this in Javascript because it is quite tedious to make it work across all browsers in Javascript and JQuery simplifies this in a single function."

      I suggest you to download the source code and run it in Tomcat Server to understand how this works.

      Thanks,
      Priya

      Delete
    2. Hi Priya,
      I appreciate your quick response.
      The JQuery library was added in the jsp file but it wasn't working because of internet connection (slow) i suppose.
      I downloaded the Jquery Js file ....now its working fine.

      Thanks,
      Rammohan

      Delete
    3. Good that you got it working fine!

      Thanks,
      Priya

      Delete
  17. Replies
    1. can u provide dojo with ajax example in servlets
      pls............

      Delete
    2. Hi Suresh,

      Thank you for stopping by here. Since DOJO is deprecated in Struts framework and everyone are shifting to jQuery instead of DOJO, I did not write about it. However,DOJO is also a very efficient plugin and has its own plus and minus.
      I recommend below articles for you to get started with DOJO. If possible I will also write about it, not a sure thing though,

      http://today.java.net/pub/a/today/2006/04/27/building-ajax-with-dojo-and-json.html

      http://www.vogella.com/articles/AjaxwithDojo/article.html

      Hope this helps.

      Thanks,
      Priya

      Delete
  18. How to pass the listvalues to jquery,
    Here i get input from user and then pass the values to db through url

    var tan = $(this).val();
    alert('This '+tan+' was selected');
    $.ajax({url : "selectedbatchaction.action",

    url'selectedbatchaction.action',after that i fetch the values from db and display on jsp page.
    like. select val1 from tablename where batch='selectedbatchaction.action';
    Here i passed the where clause values,now i want to get get val1.

    ReplyDelete
  19. Very simple and very straight forward way of explaining .
    Thanks

    ReplyDelete
  20. Hi
    I tried the code you have shared here , i did a plain copy paste without a single modification.
    I am not getting expected output ie., I dont get Hello Priya when i give the input as priya for the textbox.
    I am afraid the call to the servlet method is not happening ? Can u tell me If i have missed out something?

    ReplyDelete
    Replies
    1. Hi,

      May I know what is the output you are getting other than the expected output? I suggest you to include the latest jquery library in your project and try again.Try debugging with alert statements in the jquery script.

      One more option is to download the source code and run it using Eclipse IDE.

      Thanks,
      Priya

      Delete
  21. I downloaded the sourcecode shared by you and compared and replaced it with the one i had.
    And as you said i tried debugging using alert statements after the click call on pressing submit .
    Here i can get the alert box with the username , but the call to the servlet for the get method is not working .




    $(document).ready(function() {
    $('#submit').click(function(event) {
    var username=$('#user').val();
    alert("username "+username);
    $.get('ActionServlet',{user:username},function(responseText) {
    $('#welcometext').text(responseText);
    });
    });
    });

    ReplyDelete
    Replies
    1. So jQuery is working. Did you properly give servlet mapping in web.xml file?
      What is the error you are getting?

      Did you try running the source code directly from Eclipse? If you can get that working fine then you have to compare it even more to get your project working.

      Thanks,
      Priya

      Delete
    2. Hi Priya,

      Thanks for ur reply and sorry it was my mistake that in my servlet code I had the response.contentType(application/json) ie., of json object type.
      Due to this the response sent was not shown in the $('#welcometext').text(responseText);
      So now when i change the contentType to 'text/plain' , your example works superbly and without any hassles.

      Thank you again for that very simple explanation of using Jquery with servlet.

      regards
      Sabir

      Delete
    3. Hi Sabir,

      Thank you for coming again and updating the status. Good that you got it working fine.

      Thanks,
      Priya

      Delete
  22. can u provide Jquery With Ajax and Webservice call in servlet

    ReplyDelete
  23. Nice demo, thanks. It seems the queries are being cached. I added logging to the servlet and while the AJAX responses are updating the page, I don't see the log entries unless I change the input text.

    ReplyDelete
    Replies
    1. Hi Valon,

      Thank you. Yes, by default all ajax responses are cached, if you wish to turn off caching either you should go for POST operation instead of GET or you can specify this option 'cache:false' when making ajax calls.

      Thanks,
      Priya

      Delete
  24. Thanks - this worked great.

    $.ajaxSetup ({
    cache: false
    });

    $(document).ready(function() {
    $('#submit').click(function(event) {
    var username=$('#user').val();
    $.get('ActionServlet',{user:username},function(responseText) {
    $('#welcometext').text(responseText);
    });
    });
    });

    ReplyDelete
    Replies
    1. Most Welcome! Thanks for sharing code here!

      Delete
  25. Hey good tutorial.. But the link mentioned in the index.jsp file
    "http://code.jquery.com/jquerylatest.min.js" is no longer available.
    Instead this one is working : "http://code.jquery.com/jquery-latest.js".

    ReplyDelete
    Replies
    1. Updated my code! Thank you for the info...

      Delete
  26. hi, this code is good. actually i am creating web application in that 3 buttons are there with three student names when we click on the first button all the details of first student will display in one div. if i click on second button all the second student details will replace the first student details on same div. like third one also... for this i am using only ajax but i will get values but it wont replace with previous values of div. so plese send some reference to me.

    Thanks in Advance.
    Manjunath

    ReplyDelete
  27. hey i need a code for booking seats like http://redbus.in where tickets books for buses but i want in movie ticket booking so please help me (:

    ReplyDelete
  28. Clear cut Example and first time I am seeing such a responsive page admin.
    All the Best.

    ReplyDelete
  29. Hi Priya,

    Can I use Ajax directly with Struts 2? If can't what are the options I have?

    ReplyDelete
    Replies
    1. Hi,

      Struts2 provides a jquery plugin for ajax support commonly known as the struts2-jquery-plugin. Before this Dojo toolkit was used in Struts but this is deprecated in version 2.
      It is actually possible to use plain jquery ajax method with struts2 but it is not a best practice and using struts2-jquery plugin will make your JSP more readable with very few lines of code, check this out,

      https://code.google.com/p/struts2-jquery/wiki/FAQ

      Hope this helps!

      Thanks,
      Priya

      Delete
    2. Thanks Priya. Great Posts keep up the good work. Wish You Best of Luck

      Delete
  30. Hello friends,
    I checked this code, and its working fine but can i send file (a image to server side) by this method? i changed the get method to post but it hangs down. and nothing happens. actually my need is: I have created a popup box onto which i use form with option to upload image, and on clicking the submit buttton the form should be send to server side asynchronously.
    any help will be appreciated.

    ReplyDelete
  31. I am still waiting for a reply.
    Hi Priya can you plz. sugest some thing..

    ReplyDelete
    Replies
    1. Hi,

      Sorry for late reply. This should be done tricky. If your requirement does not require IE compatibility, then you can try this simple solution,

      http://blog.w3villa.com/websites/uploading-filesimage-with-ajax-jquery-without-submitting-a-form/

      Otherwise, go for this option,

      http://blog.w3villa.com/programming/upload-image-without-submitting-form-works-on-all-browsers/

      Hope this helps!

      Thanks,
      Priya

      Delete
    2. Hi,

      Check out my latest post, I have implemented ajax style file upload in java web applications.

      http://www.programming-free.com/2013/06/ajax-file-upload-java-iframe.html

      Hope this helps too!

      Thanks,
      Priya

      Delete
  32. Awesome ... Simple ... Excellent...

    Thank you so much.. It helped me a lot.

    ReplyDelete
  33. Super,Easy to understand as well for every beginners

    ReplyDelete
  34. Hai Priya,

    Good Stuff for beginners.Thank you very much.

    But still i have some concerns,please let you clear for me

    1)How many ways do we make ajax calls to server from client.

    2)what are the client-side languages.

    3)whether AJAX and JavaScript languages are same or not?


    Thanks
    Srinivas

    ReplyDelete
  35. Very goooood, function run good
    thank

    ReplyDelete
  36. Hi Priya,

    Great example and advice. I have an example of where a user will interact with a JSP or HTML page submitting values via a HTML form. This in turn will interact with a Servlet, where inside the doPost, it must invoke a Web Service to a WorkFlow Engine. The Engine will then execute logic within a WF. This could take 1 minute or 10 minutes to complete all depending on many factors. The WF returns a token, and using this token a subsequent set of API calls can be made to retrieve a status of the WF , if it is pending, running, completed, or failed. When I execute the Web Service method call I fork the thread so that the user is not waiting a long time for the doGet "View" rendering to occur when the WF is finished executing.

    Is there a way inside a JSP page or Servlet doGet method to introduce AJAX such that it could show a progress until the web service status indicates it is completed? Once the WF shows a progress of completed, an additional call can return the result set, so ideally I would at the end display the result of the execution inside the page.


    So again, the user will just post data, and wait for a page to render. Without AJAX, the user gets a page telling them to check their email for details since the WF takes anywhere from 1 to 10 minutes to even 20 minutes to complete... If the page had ajax flash a progress until the backend calls are completed it would be ideal. I could even have it return a different html output if a certain amount of time has been exhausted so the user is not waiting in front of the browser for 10 minutes. E.g. it could display progress until results for 2-5 minutes, beyond that, display message the the WF is still running and that the user should check their email...

    Any advice to this end will help, this is how I am trying to leverage AJAX in this case.

    Thanks,
    RJ

    ReplyDelete
    Replies
    1. Hi,

      I did a quick search for updating UI while the server process is still running via AJAX call and found these links for you,

      http://elfga.com/blog/2012/10/03/bootstrap-progress-bar-update-jqueryajax/

      http://stackoverflow.com/questions/2792558/are-there-progress-update-events-in-jquery-ajax

      Hope this helps!

      Delete
    2. can you give the example without jquery

      Delete
  37. some time problem to dynamic upload and display image so plz help me ..........

    ReplyDelete
  38. All Usefull post for beginers of AJax

    ReplyDelete
  39. I would just like to say a quick thank you for this simple and easy to use example.

    I have been looking to exactly that,a simple and easy to use example just to get an idea of how this works, so I could build on it for my own needs. But i have found it nearly impossible to find one.
    They have either all been too complicated or simply do not work.

    Yours, took me approximately 3 minutes from start to finish.

    so a big THANK YOU from me!

    :-D

    ReplyDelete
  40. I am having one post box and having comment box below it.
    if one user post something which is stored in db nd other user comments on it.If the comment is going on increasing then i want to load that comments without loading full page.Do you have any idea for it.
    thanx.

    ReplyDelete
  41. After clicking on the submit button "hello username" is not printing.. solution?

    ReplyDelete
  42. i want use the ajax without jquery. can I use? how to send the ajax request to servlet?

    ReplyDelete

emo-but-icon

Currency Converter

Built using AngularJS and ASP.NET Web API

SUBSCRIBE


item