I am using struts2 framework for development. The users can download the image from our web page. The following code is worked but i have some question on the following code.
<result name="success" type="stream">
<param name="contentType">image/tiff</param>
<param name="inputName">fileInputStream</param>
<param name="contentDisposition">filename="test.tif"</param>
<param name="bufferSize">20480</param>
</result>
When user request the image, the system read the physical file and pass it into fileinputstream.
File f = new File("C:/test.tif");
fileInputStream = new FileInputStream(f);
however, if one or more users request the same images at the same times, is that any problems occur for the above code? If yes, how can i edit the code to avoid the concurrent problems?
- How can i read the physical file and then put it into memory file then pass the memory file to the client site?
Thanks