Results 1 to 1 of 1
- 03-25-2008, 01:45 AM #1Member
- Join Date
- Mar 2008
- Rep Power
display images in a Web Application based on java/jsp
This is my first post here and not sure if this is the right place to ask this question. Let me know if I have to repost my question elsewhere.
So here is my question:
I am currently working on a web app. It has got lots of java code, jsp file, xml etc. On one of the JSP pages I have to display some images. There is a dedicated folder storing all images and icons. I have to get some images from the dedicated image folder and display them on the JSP page. But I am trying to do this dynamically, I don't want to hardcode the images' location in the JSP or Java code. I am calling a java method
But anyway, what I don't understand is that my images and icons get displayed in Internet Explorer but Firefox fails to show those images & icons.
Even though, I am trying not to hardcode any image path, I am unintentionally doing it. Becuase getResource("/") returns me a path something like
Can anyone suggest a better way of doing this? Obviously webapps will be on a server, users will be connecting to the webapp via their browsers but I guess I need to have some way of sending the image over to the users' browser. How do I do something like this?
- By talk_to_vivekmishra in forum CDC and Personal ProfileReplies: 3Last Post: 12-30-2010, 11:07 AM
- By AMATYA-CHANAKYA in forum Advanced JavaReplies: 2Last Post: 04-23-2008, 05:54 PM
- By talk_to_vivekmishra in forum CLDC and MIDPReplies: 0Last Post: 08-14-2007, 08:23 AM
- By toby in forum Advanced JavaReplies: 1Last Post: 08-07-2007, 05:54 AM