| Author |
WAS Absolute Path
|
avni singh
Greenhorn
Joined: Sep 25, 2008
Posts: 4
|
|
I am uploading some images to the server and then subsequently need to display these images in my JSP in a grid. For the path, which is a parameter of the application, I want to use the server absolute path eg. C:\pics\ Please guide as to how I can achieve this. For Jboss, I need to map a virtual drive to this path and then can retrieve the image using this. Any help would be appreciated. Thanks!
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16483
|
|
|
I don't understand the question. Are you asking how you can access files in that directory on the server? (You just do it.) Or are you asking how to configure application parameters in Websphere?
|
 |
avni singh
Greenhorn
Joined: Sep 25, 2008
Posts: 4
|
|
Hey Paul! Thanks for the prompt response. Basically, I amsetting this parameter in the System Properties in WAS. I can retrieve the value using System.getProperty. The problem is this paramter stores the absolute path of the server - I am uploading pictures to this path and then need to display the same on my jsp using image tag. The picture however, does not display on the jsp when we use the absolute server path eg. C:\pics\
|
 |
Anant Rao
Ranch Hand
Joined: Nov 12, 2004
Posts: 126
|
|
Are you seeing any errors in SystemOut.log when trying to access those files. Did you verify if the server runAs id has read access to that directory. Anant
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16483
|
|
Originally posted by avni singh: The picture however, does not display on the jsp when we use the absolute server path eg. C:\pics\
If this means that your JSP is generating an <img> element whose href attribute contains "C:\pics\yikes.jpg" then no, that won't work. (I'm just guessing at that, your post wasn't nearly as precise as that.) Anyway if you want to have links to files in that directory, you will have to configure your web server to map some URLs to that directory. Or you could write a servlet that serves out images from that directory given some kind of parameter which identifies the image. (I'm not being very precise here because there's no point in spending a lot of time to solve a problem you don't actually have. More details about what isn't working would be helpful.) [ November 15, 2008: Message edited by: Paul Clapham ]
|
 |
 |
|
|
subject: WAS Absolute Path
|
|
|