I am creating web application using jsf 2.0. I have command button where style is as below.
What I have is
style="#{patentInfo.photoType.contains('application')?'visibility:visible;background-image: url(DisplayImage?mainID=tempo1;id=1)':'visibility:hidden;'
In DisplayImage.java below is what I have
String mainID = request.getParameter("mainID");
String whatString = request.getParameter("id");
System.out.println("mainID=="+mainID+", whatString=="+whatString);
Output I was expecting is
mainID==tempo1, whatString==1
however I am getting it as
mainID==tempo1;id=1, whatString==null
^^^^^
That means I would need to use third separator like “, ‘ after url(DisplayImage?mainID=tempo1;id=1)
i.e. something like
url(@DisplayImage?mainID=tempo1;id=1@)
^ ^
Just curious, is there third level separator like inverted comma we have?
Please suggest me what should I do?
Edit 1
If I use like below, it works perfectly as I have used only 2 levels as ” and ‘.
style="background-image: url('DisplayImage?mainID=tempo1;id=1')"
I need solution for third level.
URL parameter separators are
?and&.you can use
url(DisplayImage?mainID=tempo1&id=1)