Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 30B303ED5 for ; Fri, 6 May 2011 02:05:51 +0000 (UTC) Received: (qmail 65579 invoked by uid 500); 6 May 2011 02:05:47 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 65413 invoked by uid 500); 6 May 2011 02:05:47 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 65404 invoked by uid 99); 6 May 2011 02:05:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 May 2011 02:05:47 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RFC_ABUSE_POST,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mgainty@hotmail.com designates 65.55.111.76 as permitted sender) Received: from [65.55.111.76] (HELO blu0-omc2-s1.blu0.hotmail.com) (65.55.111.76) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 May 2011 02:05:41 +0000 Received: from BLU142-W31 ([65.55.111.73]) by blu0-omc2-s1.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 5 May 2011 19:05:20 -0700 Message-ID: Content-Type: multipart/alternative; boundary="_09d0e694-5c67-4726-8a1b-f9afbb350714_" X-Originating-IP: [24.34.12.246] From: Martin Gainty To: Tomcat Users List Subject: RE: storing images Date: Thu, 5 May 2011 22:05:20 -0400 Importance: Normal In-Reply-To: <150880078-1304645563-cardhu_decombobulator_blackberry.rim.net-1251793382-@bda448.bisx.prod.on.blackberry> References: <7B8C0B59-F57A-4778-9E7B-4B190A33A844@gmail.com><4DC33A39.40404@christopherschultz.net>,<2023570233-1304641148-cardhu_decombobulator_blackberry.rim.net-1665235932-@bda448.bisx.prod.on.blackberry>,<150880078-1304645563-cardhu_decombobulator_blackberry.rim.net-1251793382-@bda448.bisx.prod.on.blackberry> MIME-Version: 1.0 X-OriginalArrivalTime: 06 May 2011 02:05:20.0979 (UTC) FILETIME=[0DB1D230:01CC0B92] --_09d0e694-5c67-4726-8a1b-f9afbb350714_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable yes session variables would be specific to user's session servlet-context and params are available to any requestor who accesses the = servlet Martin Gainty=20 ______________________________________________=20 Jogi =E9s Bizalmass=E1gi kinyilatkoztat=E1s/Verzicht und Vertraulichkeitanm= erkung/Note de d=E9ni et de confidentialit=E9 Ez az =FCzenet bizalmas. Ha nem =F6n az akinek sz=E1nva volt=2C akkor k=E9rj=FCk= =2C hogy jelentse azt nek=FCnk vissza. Semmif=E9le tov=E1bb=EDt=E1sa vagy m=E1solat= =E1nak k=E9sz=EDt=E9se nem megengedett. Ez az =FCzenet csak ismeret cser=E9t szol= g=E1l =E9s semmif=E9le jogi alkalmazhat=F3s=E1ga sincs. Mivel az electronikus =FCzene= tek k=F6nnyen megv=E1ltoztathat=F3ak=2C ez=E9rt minket semmi felel=F6s=E9g nem = terhelhet ezen =FCzenet tartalma miatt. Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaeng= er sein=2C so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiter= leitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient l= ediglich dem Austausch von Informationen und entfaltet keine rechtliche Bin= dungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen w= ir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut =EAtre privil=E9gi=E9. Si vous n'=EAtes= pas le destinataire pr=E9vu=2C nous te demandons avec bont=E9 que pour sat= isfaire informez l'exp=E9diteur. N'importe quelle diffusion non autoris=E9e= ou la copie de ceci est interdite. Ce message sert =E0 l'information seule= ment et n'aura pas n'importe quel effet l=E9galement obligatoire. =C9tant d= onn=E9 que les email peuvent facilement =EAtre sujets =E0 la manipulation= =2C nous ne pouvons accepter aucune responsabilit=E9 pour le contenu fourni= . > Subject: Re: storing images > To: users@tomcat.apache.org > From: alzrck@gmail.com > Date: Fri=2C 6 May 2011 01:32:40 +0000 >=20 > Yes for the ajax. >=20 > If im getting it well=2C i have no need to tie the user with an image ins= tance. image1 is the same for every users. >=20 > Isnt servletcontext shared within the webapp? Meaning that every session = access the same servletcontext? >=20 > Regards >=20 > Enviado desde blackberry >=20 > -----Original Message----- > From: Martin Gainty > Date: Thu=2C 5 May 2011 21:26:12=20 > To: Tomcat Users List > Reply-To: "Tomcat Users List" > Subject: RE: storing images >=20 >=20 > achieved if you correspond the userid-imageid parameter with the acquired= image identifier e.g. > ?code=3D1.1 puts user1 image 1 on servlet and returns > ?code=3D1.2 puts user1 image 2 on servlet and returns > ?code=3D2.1 puts user2 image 1 on servlet and returns >=20 > are you using XMLHTTPRequest for ajax ? > Martin Gainty=20 > ______________________________________________=20 > Verzicht und Vertraulichkeitanmerkung/Note de d=E9ni et de confidentialit= =E9 > Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfa= enger sein=2C so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Wei= terleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dien= t lediglich dem Austausch von Informationen und entfaltet keine rechtliche = Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koenne= n wir keine Haftung fuer den Inhalt uebernehmen. > Ce message est confidentiel et peut =EAtre privil=E9gi=E9. Si vous n'=EAt= es pas le destinataire pr=E9vu=2C nous te demandons avec bont=E9 que pour s= atisfaire informez l'exp=E9diteur. N'importe quelle diffusion non autoris= =E9e ou la copie de ceci est interdite. Ce message sert =E0 l'information s= eulement et n'aura pas n'importe quel effet l=E9galement obligatoire. =C9ta= nt donn=E9 que les email peuvent facilement =EAtre sujets =E0 la manipulati= on=2C nous ne pouvons accepter aucune responsabilit=E9 pour le contenu four= ni. >=20 >=20 >=20 >=20 > > Subject: Re: storing images > > To: users@tomcat.apache.org > > From: alzrck@gmail.com > > Date: Fri=2C 6 May 2011 00:19:06 +0000 > >=20 > > What i did (im testing and profiling it) is. > >=20 > > As the images are around 10/12 and each image has around 30 to 35k. > >=20 > > Im storing the images as servletcontext attribute. > >=20 > > So calling to the servlet with ?code=3D1 builds and stores image1 on se= rvlet context. And returns html with=20 > > >=20 > > So ajax sends that to the jsp that calls servlet?get and that returns t= he image. > >=20 > > It's working now=2C what im profiling is to verify no matter how many u= sers are requesting images=2C image1 is the same for every user and if one = user builds up the image again=2C all others gets the new one. > >=20 > > As those images are stored on servletcontext=2C all are shared among th= e webapp so images are not duplicated or triplicated or n-cated. > >=20 > > I dont know if it's a good solution=2C but up to know it's working and = really fast. > >=20 > >=20 > > Regards > >=20 > >=20 > > Enviado desde blackberry > >=20 > > -----Original Message----- > > From: Christopher Schultz > > Date: Thu=2C 05 May 2011 20:00:57=20 > > To: Tomcat Users List > > Reply-To: "Tomcat Users List" > > Subject: Re: storing images > >=20 > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > >=20 > > Alexis=2C > >=20 > > On 5/5/2011 2:19 PM=2C alexis wrote: > > > I have a servlet that basically does > > >=20 > > > . creates an image > > > . store the image on disk > > > . returns an html tag pointing to the stored image. > > >=20 > > > there's no way to return binary content (the image) from the servlet = to the ajax script. > >=20 > > What about JSON? Not that I think it's a terribly good idea=2C but it's > > just a thought. > >=20 > > Another thought is possibly using a database=2C relational or otherwise= =2C > > rather than the file system. Of course=2C you'd have to write your own > > servlet to access the image from the database instead of the filesystem= =2C > > so I'm not sure it buys you much over the other solutions presented alr= eady. > >=20 > > - -chris > > -----BEGIN PGP SIGNATURE----- > > Version: GnuPG v1.4.10 (MingW32) > > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > >=20 > > iEYEARECAAYFAk3DOjkACgkQ9CaO5/Lv0PDzmgCeK2tN3eH+aVY6ElmFiKRe+cj7 > > WZcAn0Yj9qSklAynFdBeyRsL/wl0TpWD > > =3D41U2 > > -----END PGP SIGNATURE----- > >=20 > > --------------------------------------------------------------------- > > To unsubscribe=2C e-mail: users-unsubscribe@tomcat.apache.org > > For additional commands=2C e-mail: users-help@tomcat.apache.org > >=20 > =20 = --_09d0e694-5c67-4726-8a1b-f9afbb350714_--