Hi, 
I want to implement a "secure file server" using Struts. By "secure" I mean, 
when a file is requested by a user, a "checkAccess" method will be called 
and it would check if the user has right to access that file (datasource 
will be used for this check) If checkAccess return true the file will be 
sent to the user. This scenario is very well suited to the logic of 
DownloadAction BUT my fileserver has to work with html files containing 
images. When you request an html file containing images, the browser will 
automatically request that images from the server. For this to work i should 
pass the filename in a regular URL like in "
http://localhost:8080/myfileserver/try.html"; . I think this has to be like 
this, I cannot pass the filename as a request parameter like in "
http://localhost:8080/myfileserver?filename=try.html"; since this way images 
will not be requested properly.
My problem is I cannot construct an url mapping in web.xml such that when 
user clicks this link: "http://localhost:8080/myfileserver.do/try.html"; I 
should be able to obtain the "try.html" part. But the default Struts action 
servlet mapping which is "*.do" does not allow this. I tried "*.do/*" but no 
way. 
How can I find a mapping such that request.getPathInfo() would not return 
"null" for me. 
Thanks in advance.

Reply via email to