Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Accessing resources(files) outside WAR application file

Reply
Thread Tools

Accessing resources(files) outside WAR application file

 
 
may
Guest
Posts: n/a
 
      10-21-2003
I would like to know if it is possible to access resources, e.g. image
file, text file which reside on the application server (but not in
war/ear files) using JSPs/servlet.

Tasks I am trying to accomplish are:

- User to upload file (image, text). I can do this using JSPs and
Servlet/struts. File is uploaded on the appserver at a location
relative to webcontext. File path is apended after obtaining
HttpSerletRequest.getContextPath().

- User then clicks a link to view the image/text file just uploaded in
the previous step.

Last step is where the problem occurs as link is trying to access
resource which is not within its EAR/WAR file and therefore it can not
find the file. Using HttpSerletRequest.getContextPath() returns path
within the WAR file which is root folder of WAR file. File uploaded
in the previous step can not be added to WAR file unless the
application WAR file is rebuilt and redeployed. Redeploying
application every time any user uploads a file is obviously not a
desirable approach.

I do not know if it is possible to access file system on application
server outside of the web application WAR/EAR files.

Or is redeploying application is necessary which means that it will
need to be scheduled at an appropriate time and therefore user will
not be able to view the web page until then.

Any help/pointers will be much appreciated.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
The War Criminal about to Start another War CtrlĄ/AltĄ/DelĄ Computer Support 30 11-30-2010 02:45 PM
Pix 506e w/5 static outside IPs - How to create a rule to allow ALL tcp/udp traffic from one outside IP to an internal IP (for an internal router/NAT with it's own subnet) kyoo Cisco 22 04-12-2008 03:37 PM
help with pix inside->outside + dmz->outside + inside->outside->dmz Jack Cisco 0 09-19-2007 01:57 AM
CallForward outside->inside->outside failed after one ring. Yogz Cisco 1 04-16-2007 03:58 PM
nat from outside to outside dt1649651@yahoo.com Cisco 1 08-21-2005 04:26 PM



Advertisments