1

we have a server where an application is hosted. in our current configuration, our web server (IBM HTTPD) redirects all its requests to the application server (WAS).

Now, we want to access a file under application directory through a link in an email. Such that, if we click the link we will be able to get the pop up to save/open the file from server.

we tried a simple approach to this with tomcat. we placed a file under htdocs folder and we were able to resolve its link as : http://[hostname]:[port]/[contextRoot]/[file]

but when we tried to do the same thing under IBM HTTPD htdocs, we were unable to access the file (as the requests are redirected to WAS). now, what are the approaches to access the file? can we write a servlet to redirect the incoming request to the file?

any startup guide will be really helpful. pls assist.

Kannan Lg
  • 133
  • 2
  • 7

2 Answers2

0

You can try this aproach: use cron to copy the file regularly to a directory where you can set the apropiate permissions and then include that directory as a virtual server in Tomcat's configuration. The downside is that you will be getting a file at least 1 minute old. You will need a littel bash script that will copy the file and set permissions to make it accesible through the web server.

Daniel J.
  • 214
  • 1
  • 5
0

Well, since IBM HTTPD is based off Apache, there should be an httpd.conf to edit, in the 'conf' directory of the installation.

Then read up on how to set up an alias in the Apache config. http://httpd.apache.org/docs/current/mod/mod_alias.html#alias

Alias a directory where you want to store the downloadable files, and set the proper permissions for WAS to write there, and for the Httpd to read it. And you will need to make WAS know where to put the file with a property in your application obviously.

Stian Lund
  • 180
  • 5