File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

image path goes wrong.

roby george
Ranch Hand

Joined: Sep 08, 2010
Posts: 31
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.

I agree. Here's the link:
subject: image path goes wrong.
It's not a secret anymore!