Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@jakarta.apache.org Received: (qmail 17213 invoked by uid 500); 4 Apr 2001 13:51:22 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: tomcat-dev@jakarta.apache.org Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 17108 invoked from network); 4 Apr 2001 13:51:21 -0000 Reply-To: From: =?iso-8859-1?Q?Emmanuel_L=E9charny?= To: Subject: RE: servlet Date: Wed, 4 Apr 2001 15:54:19 +0200 Message-ID: <006101c0bd0e$c12086a0$d23e05c0@victor> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 In-Reply-To: <557147C53CBBD411B49200508BE3A874791FA7@nyschx18psge.sch.ge.com> Importance: Normal X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N 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, www.iktek.com -----Message d'origine----- De : pushpendra.singh@ps.ge.com [mailto:pushpendra.singh@ps.ge.com] Envoy� : mercredi 4 avril 2001 14:38 � : tomcat-dev@jakarta.apache.org 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.