tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
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
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kiran,

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
yourself.

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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlBRSGUACgkQ9CaO5/Lv0PAIbACfYgbM2eyv5TD8uYC7GfV2taUB
uOAAn1RHpGwal9jkMe6HRiBazEAJ6CCa
=jqvA
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message