File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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.


 
It is sorta covered in the JavaRanch Style Guide.
 
subject: image path goes wrong.
 
Similar Threads
image does not display on JSP page w/ Tomcat server
Image not getting displayed in JSP
problem in displaying image and css file in Eclipse europa 3.3.2
unable to display image files in jsp
Problem in displaying an image