tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: Limits on the size of the web.xml file?
Date Mon, 03 Sep 2001 20:08:31 GMT


On Mon, 3 Sep 2001, Roland wrote:

> Date: Mon, 3 Sep 2001 16:37:17 -0300
> From: Roland <roland@netquant.com.br>
> Reply-To: tomcat-user@jakarta.apache.org
> To: tomcat-user@jakarta.apache.org
> Subject: Re: Limits on the size of the web.xml file?
>
> > The details *vastly* depend on how your app is put together, but it isn't
> > all that complicated to figure out.
> >
> > Consider that you might have the mailboxes for a particular user defined
> > in a database table called "mailboxes", with columns "username" and
> > "mailboxname".  It would be easy to construct an SQL statement like this:
> >
> >   select mailboxname from mailboxes
> >     where username = xxx
>
> Ok, having Data in the database is fine. But what if we also have image
> data? We will store Charts and things like that. I think it would be easier
> to create a directory for each user(maybe I'm wrong). It is possible to
> store images in a mysql database but I think its not as easy as text data.
> And then we will have to create a HTML page from that image data and send it
> to the user.

Storing binary data in the database isn't all that hard.  Then, all you'd
need to do is create a servlet mapped to "*.gif", "*.jpg", and so on that
did the user identity check before serving the contents (in binary).  The
same basic principle would work for data stored in per-user directories.
In essence, you're replacing the default file-serving servlet that comes
with Tomcat.

If you run under Tomcat 4 (which supports Servlet 2.3), you also have
another choice -- you can implement your custom authentication checker as
a Filter instead of a Servlet.  That way, you can apply your own custom
check onto any path, without having to modify or replace the file-serving
servlet that comes with Tomcat.

Craig



Mime
View raw message