Chris
I like your approach.

Thanks all I learned the tomcat context concept from your guys...need to
look into it.
Vishwanath

On Thu, Sep 13, 2012 at 8:13 AM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -----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-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Reply via email to