1

I am trying to access external folder from my Restful webservices. I want to get the images of the external folder from in the HTTP get. I have tried configuring the web.xml but it did not work for glass fish.

Could some one please help me add the path of the folder C:/documents/images to xml so that I can access them from http://localhost/api/pictures

I have a servlet running, I can get the database data but I am finding hard time mapping the external folder in web.xml.

Rehan faiz
  • 31
  • 3

1 Answers1

-1

add "Alternate Document Roots" configuration to glassfish-web.xml to external folder:

property description="Uploads" name="alternatedocroot_1" value="from=/img/* dir=c:\Temp"

put images to c:\Temp\img folder and URL should be: http://localhost/project/img

Tadas B.
  • 176
  • 8