This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes JSF and the fly likes image path goes wrong. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSF
Bookmark "image path goes wrong." Watch "image path goes wrong." New topic
Author

image path goes wrong.

roby george
Ranch Hand

Joined: Sep 08, 2010
Posts: 31
Hello,
I have a login page in my application, In that i am using a login image.
I am accesing that image like bellow
<img src="${images}medical.png" width="285" height="148" />
the image variable is comming from
<c:url value="${LinLogin.imagesPath}" var="images"/>
LinLogin is bean and imagePath is a string getter/setter, i am populating this getter/setter in prerender method.
When i m invoking my application the login page display but the image is not comming, I check the source code of that pafe the image path shows me like bellow
<img width="285" height="148" src="/lin/resources/theme/default/images/;jsessionid=54BE595C60CED84F4E5F701ED0752193medical.png"/>
it should be like bellow
<img width="285" height="148" src="/lin/resources/theme/default/images/medical.png"/>

the jsessionid=54BE595C60CED84F4E5F701ED0752193 is autometicaly apend in image path so thats why my image is not displaying the image path gows wrong.

Can anybody gives me suggestion/ideas how to solve this issue.




Guy deLyonesse
Ranch Hand

Joined: Apr 12, 2011
Posts: 200

In the line



Is the String variable for your image path stored in an object called images? If so then the syntax should be


Note the use of # instead of $ also.


 
GeeCON Prague 2014
 
subject: image path goes wrong.