I am developing a spring mvc web app , in one of the jsp's i am trying to display image in a dialog box :
my javascript function is as follows :
function displayImageData(param1,param2,param3)
{
$('#dialog-image-data-div').dialog({
modal:true,
width: 1200,
height: "auto" ,
resizable:false,
autoOpen : false,
position: ['center',70],//used for positioning the dialog
});//end of dialog method
$('#dialog-image-data-div').dialog("open");
$('#dialog-image-data-div').html(' <img src="fetchImageData?param1=${param1}"/> ');
}
Situation:
The url in src
attribute should divert control to a controller.
In controller a business service will take three parameters namely param1
, param2
and param3
and fetch the image from db.
Problem :
My problem is i am not able to pass these three paramters in the url specified in src
attribute and i also dont know what the RequestMapping
of the method in controller will look like , i gave googled a lot but i am not able to find answers can anyone help ?