tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Where do I store Images in tomcat structure so that I can retrive it properly in all browsers
Date Thu, 13 Sep 2012 02:43:49 GMT
Hash: SHA1


On 9/11/12 10:44 PM, Kiran Badi wrote:
> On 9/8/2012 4:09 PM, Konstantin Kolinko wrote:
>> Regarding the aliases feature:
>> single path -> multiple file paths: No multiple different
>> non-intersecting paths -> multiple file paths: Yes
>> As far as I remember, an example of using multiple aliases is
>> present in documentation.
> Thanks Konstantin, it seems to be working perfectly fine.
> This is how I am doing it now,
> <Context 
> aliases="/UploadedImages=c:/UploadedImages,/st=c:/st,/sb=c:/sb,/UploadedImages/scr=c:/UploadedImages/scr,/UploadedImages/scyr=c:/UploadedImages/scyr,/UploadedImages/sem=c:/UploadedImages/sem">
> Now I have one clarification, I am going need  close to 150 
> categories(think of marketplace) and there will be fair amount of
> images upload which my users will be doing.
> I expect the aliases to grow till 150 to 200 paths, do you feel
> this is correct.I am not sure as how large sites deal when they
> have heavy volumes of images getting uploaded on daily basis.

Large sites will use a single URL that ends up resolving the images
from some kind of data source. That data source might be a disk (e.g.
you could forward to the DefaultServlet) or a database (relational or
otherwise) where you would write your own servlet to retrieve the data

I would use a servlet that gets the image identifier from the request
parameters or "path info" and then continues from there. As Konstantin
points out, using Tomcat's "aliases" feature means that these requests
may have to perform a linear search through all the aliases to find
the requested resource. If you write a custom servlet, it will likely
perform much better than that.

Hope that helps,
- -chris
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools -
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message