tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lécharny <>
Subject RE: servlet
Date Wed, 04 Apr 2001 13:54:19 GMT
A suggestion :

First, you really need to manage a session for each user, because when a
user get the file, he must release it when he has read it. That means that
either he send another request to release the file or the session has
"timeouted", which drives to the file release.

Second, what you can do is to keep a kind of association between a file and
a user. When another user request for an already used page, you should parse
this association to see if the file is used by somebody or not.

Third, this association must be persistent. Just use a static class that
will be loaded once and used many times, and will never been discarded until
the server die.

Fourth, be careful with concurent access to this association. When you are
searching in the association, you must be alone doing it. If not, you wont
be able to avoid a multiple access to a file.

Emmanuel Lécharny, IKTEK
06 08 33 32 61, <>

-----Message d'origine-----
De : []
Envoyé : mercredi 4 avril 2001 14:38
À :
Objet : servlet

I am developing a web page, which will have the link to copyright protected
reference materials. I will be using some web-builder tool such as
front-page or dream-weaver.
The problem faced is the implementation of access control over the refrence
material, which is nothing but pdf files. the control should be such that
when a user is aacessing, viewing or using a file no other user user should
be able to view or access that file i.e. one user, one file at a time.
I am in a fix, what to do?
should i use the singlethreadmodel interface of servlet or jsp to develop
this control, but i am afraid that i will end up in writing 300 servlet
classes each crresponding to one pdf file.
Any suggestions addressing this problem?
Thanking you.

Pushpendra Singh.

View raw message