users@glassfish.java.net

Referring external resource like images /files from File system in glassfish

From: <forums_at_java.net>
Date: Tue, 15 Mar 2011 11:15:56 -0500 (CDT)

 

HI,

 

I have an facebook kind of webapplication which is deployed in glassfish.

The user want's to upload his photos using my application. I want to store
these images on the filesystem outside my web application deployment .

I know it is not possible to acces images from the filesystem in the web
application.

I tried this below..bit it still didn't work.. .Could any one help what's
wrong with this...?

1>

sun-web.xml present in   deployment in glassfish server as
FinanceFaceBook/Webcontent/WEB-INF/sun-web.xml

sun-web.xml content is    xml version=/"1.0"
encoding=/"UTF-8"?>sun-web-app><property name=/"alternatedocroot_1"
value=/"from=/faces dir=/opt/stage/SONYBMGBUZZ/facebook"/> sun-web-app>2> 
my jsp page acessing the image as    
img src=/"/faces/thumbs/dummy.jpg/" width=/"68" height=/"68"  />
3>  My  images are located at  :  
/opt/PBMG/stage/SONYBMGBUZZ/facebook/thumbs/dummy.jpg                                                                                                                 

Please suggest any
idea,                              

Thankx,

 

 

 

////

<

////

<?

<

 

 

 

</


--
[Message sent by forum member 'krupakar_blr']
View Post: http://forums.java.net/node/782017