-
1. Re: JsessionId getting appended to image rendered by h:graphicImage
periklis_douvitsas Jul 27, 2012 7:57 AM (in response to selfcare)Hi,
In your code in the jsp page,how do you have the value of the h:graphicImage?
What i mean is do you have like this <h:graphicImage value="
http://myDomain/static-files/images/myImage.jpg
">or do you have smothing like this
<h:graphicImage value="/static-files/images/MyImage.jpg">
If you have like in the first example, i think you have it wrong. You should not put the whole http://blabla . Maybe the application thinks that you want to access somethign outside of your application. Since, this image is in your code, (in a folder in your web applciation) and not somewhere in the internet in another server you should put the relative url of the image.
so something like the second example
have a look at these web pages
http://www.mkyong.com/jsf2/jsf-2-graphicimage-example/
http://www.roseindia.net/jsf/graphicImage.shtml
make sure you set the value correct. (the relative path)
aslo leave the setting
javax.faces.STATE_SAVING_METHOD
to server as it was before and do not wrire any rewrite rule in aapche web server.
Hope it helps
-
2. Re: JsessionId getting appended to image rendered by h:graphicImage
selfcare Jul 27, 2012 8:44 AM (in response to periklis_douvitsas)Hi Periklis,
Thanks.
I have <h:graphicImage value="/static-files/images/MyImage.jpg"> in my code. Its a relative URL.
But, the image is lying in Apache web server and not in my war file. I dont want to put the image in my war file, because tomorrow if requirement changes
and if I need to change the image then I cant redeploy my war in server. I just want to update the image on the fly in web server.
Keeping this in my mind, I am retrieving the image from web server using a relative url like "/static-files/images/MyImage.jpg". So, how to solve this?
Regards,
Vikas
-
3. Re: JsessionId getting appended to image rendered by h:graphicImage
periklis_douvitsas Jul 27, 2012 9:13 AM (in response to selfcare)Hi,
In the conf folder
ie for the default configuration server\default\conf there is a file called jboss-service.xml.
In this one there is a section
<attribute name="URLs">
deploy/
</attribute>
the comments above these help you a lot.
I think this is where you have to put the relative url of the file.
i.e something like this
<attribute name="URLs">
deploy/, file:/static-file/images/MyImage.jpg
</attribute>
have it a try
-
4. Re: JsessionId getting appended to image rendered by h:graphicImage
selfcare Jul 31, 2012 12:07 AM (in response to periklis_douvitsas)Hi Periklis,
I had a look into jboss-service.xml file. It doesn't have an entry for attribute name="URLs" . Are you trying to say I need to make a new entry for URL attribute?
Am using Jboss AS 5.1.0 GA
Regards,
Vikas
-
5. Re: JsessionId getting appended to image rendered by h:graphicImage
periklis_douvitsas Jul 31, 2012 5:09 AM (in response to selfcare)Hi,
for jboss 5 have a look at this page
https://community.jboss.org/wiki/HowToDeployMyApplicationInAnExternalDirectoryInJBoss-5
so you should put in this file under the
<list elementClass="java.net.URI">
the entry
<value>file:///
static-file/images/MyImage.jpg</value>
Good luck