Re: Something like a filter
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Maux, maux wrote: | I need to execute it before an application executes. What do you mean before an application executes? Do you mean that you need something to run before any requests are processed? Then you want to use a ServletContextListener. | I know filters are the way but I need to communicate with an applet and I | think filters and applets can´t have a two-way communication. Filters can do anything they want. how are you going to communicate with an applet before the application executes? Where is the applet running? What kind of information do you want to process? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkhP1YUACgkQ9CaO5/Lv0PDjxwCdGhdMaORWckijud2MEz+vTLPe EugAn0bxp+FpYOM6uxOgMeKpf13A7zUe =YAxN -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Something like a filter
- Original Message - From: maux [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Wednesday, June 04, 2008 4:20 PM Subject: Something like a filter Hi, I would like to know if there is something that I can configure to an application that force the application to execute that thing before it executes. I mean I need something that does more or less the same that a filter but without using the class filter. I need to configure some applications to throw an applet before the application executes. And depends in one of the return applet parameter, allow or deny the access to the application. Thanks in advance. Its not your servlet, is that right? I'm just going to guess what you asking Applet --- (Guard Servlet --- Forward the Request) -- (Original Servlet) So in your guard servlet... you can reply to the applet or let it through to the Original servlet. If it is your servlet, then its just logic in your servlet... check the params, do something, or not do it. Then you'll have to assemble a new webapp and bring in the original servlet as a lib, make a new web xml file and perform other tricks that pirates do ;) Or try dispatch across webapps... but there are other problems if you try that its better if its all in one new webapp. Something like that I think. Maux... its very hard to understand you... its ok, my spanish sucks as well ;) --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Something like a filter
Don't think a ServletContextListener gets anything but context initialize() and destroy() calls. On 6/11/08, Christopher Schultz [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Maux, maux wrote: | I need to execute it before an application executes. What do you mean before an application executes? Do you mean that you need something to run before any requests are processed? Then you want to use a ServletContextListener. | I know filters are the way but I need to communicate with an applet and I | think filters and applets can´t have a two-way communication. Filters can do anything they want. how are you going to communicate with an applet before the application executes? Where is the applet running? What kind of information do you want to process? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkhP1YUACgkQ9CaO5/Lv0PDjxwCdGhdMaORWckijud2MEz+vTLPe EugAn0bxp+FpYOM6uxOgMeKpf13A7zUe =YAxN -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Something like a filter
- Original Message - From: Karthik Abram [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, June 11, 2008 8:36 PM Subject: Re: Something like a filter Don't think a ServletContextListener gets anything but context initialize() and destroy() calls. Look at the original question, you'll see why we all guessing, its like the united nations without a translater ;) If the servlet is delivering the applet and he needs to init something at start up, then thats what Chris is trying to show him... amazing user group this, even when we dont know what the question is, you still get an answer ;) On 6/11/08, Christopher Schultz [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Maux, maux wrote: | I need to execute it before an application executes. What do you mean before an application executes? Do you mean that you need something to run before any requests are processed? Then you want to use a ServletContextListener. | I know filters are the way but I need to communicate with an applet and I | think filters and applets can´t have a two-way communication. Filters can do anything they want. how are you going to communicate with an applet before the application executes? Where is the applet running? What kind of information do you want to process? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkhP1YUACgkQ9CaO5/Lv0PDjxwCdGhdMaORWckijud2MEz+vTLPe EugAn0bxp+FpYOM6uxOgMeKpf13A7zUe =YAxN -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Something like a filter
Johnny Kewl wrote: On 6/11/08, Christopher Schultz [EMAIL PROTECTED] wrote: maux wrote: [...] Let's see if I got this right, and if I can show off a bit. Maux, faltan unos datos a esa gente para contestar, pero lo estan intentando de toda forma. 1) Imaginan que el applet no es tuyo y no puedes modificarlo. 2) Imaginan que la aplicación (el servlet) tampoco es tuya y no puedes modificarla. 3) Y imaginan que lo que quieres es : cuando el applet llama la aplicación, verificar los parametros que envia el applet, y según esos parametros, permitir o no que la llamada pase a la aplicacion. Y si no pasa, contestar otra cosa al applet, por ejemplo un mensaje de error. Justo ? Si 1-2-3 son corectos, lo puedes hacer todo con un servlet filter, que seria la solución mas simple y elegante. Un servlet filter puede elegir de contestar directamente al applet, o de pasar la llamada a la aplicación y dejar que esa conteste. Si tienes alguna razon de no hacerlo con un servlet filter, esa información les falta tambien. El (1) y (2) arriba son importantes, porque si uno de esos no es correcto, seria ahún mas fácil de modificar o el applet o la aplicación para evitar/rechazar los parametros incorectos, evitando el filtro. Translation for the language-depleted : Maux, some data is missing to give you a helpful answer, but these guys are trying nevertheless, based on the following guesses : 1) you do not control the applet 2) you do not control the application 3) what you want is to check what the applet is sending, and depending on that allow or not the application to be called. If 1,2,3 are correct, then you can do it all via a servlet filter. If you have a reason for which you do not want a servlet filter, then communicate that reason because they do not understand. And (1) and (2) are important, because if they are not true, then it would be easier still to modify either the applet or the application, and avoid the filter. So, how am I doing ? All that based on the last 2 letters of the requester's domain.. Now if he is Chinese and just works there, I give up. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Something like a filter
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Maux, maux wrote: | I would like to know if there is something that I can configure to an | application that force the application to execute that thing before it | executes. I mean I need something that does more or less the same that a | filter but without using the class filter. Does this need to execute before every request? If so, Filter is the way to go. Do you have an aversion to using Filters? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkhO3AIACgkQ9CaO5/Lv0PAcWQCgqRqMsB5kus27wW8QkJC1cvuD yMsAn1aWqoFaUU5pnSkWPIHGPYODYbcU =cdYz -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Something like a filter
I need to execute it before an application executes. I know filters are the way but I need to communicate with an applet and I think filters and applets can´t have a two-way communication. Thanks. Christopher Schultz-2 wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Maux, maux wrote: | I would like to know if there is something that I can configure to an | application that force the application to execute that thing before it | executes. I mean I need something that does more or less the same that a | filter but without using the class filter. Does this need to execute before every request? If so, Filter is the way to go. Do you have an aversion to using Filters? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkhO3AIACgkQ9CaO5/Lv0PAcWQCgqRqMsB5kus27wW8QkJC1cvuD yMsAn1aWqoFaUU5pnSkWPIHGPYODYbcU =cdYz -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Something-like-a-filter-tp17647911p17765736.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]