How do I change the address bar when I make an Ajax request?-Collection of common programming errors

I have created a website that intensively use Ajax to load its contents. I want the pages I select to load on AJAX but at the same time the URL also changes without reloading the whole page content. How would I achieve that? I’ve googled already but my search did not yield any results.

Let’s say I have this page:






    
    Insert title here
    


    
Struts Jquery Ajax Integration
 

    
    Please Turn On Javascript to make the full use of this site

    

Choose A task

    
  • Ajax Validation

    
        
Play A Music while You Navigate
        Your browser does not support the
            audio element.
        
    


I clicked the Ajax Validation link. it will not reload the page but however the url would be something like this:

localhost:8090/AppName/ajaxvalidation.jsp

or this:

 localhost:8090/AppName/ajaxvalidation.action

How would I achieve such a goal?

Note that I am using this plugin: struts2-jquery