Pages

Wednesday, August 31, 2011

How to stop caching with jQuery ($.get(), $.ajax() etc) and javascript



To make it unique for each passes, we can place in a random number behind the url as shown below
$.get('remoteUrl.do?'+Math.random()+, function(data){
	$('#msg'+id).html(data);
}, 'html');


Set cache:false 
$.ajax({
	url: 'remoteUrl.do',
	cache: false,
	success: function(data){
		$('#resultDiv').append(data);
	} }); 
$.ajaxSetup({
	cache: false
});
Disable caching using html meta tag:

org.hibernate.PropertyAccessException

nested exception is org.hibernate.PropertyAccessException: Exception occurred inside getter of Hibernate Object

Reason:
  • Nullable database column was mapped to a primitive type property
  • The Hibernate type is not castable to the property type (or vice-versa)

  • Google
     

    Java-Struts