filter: How to set browser encoding?

2005-10-12 Thread Mark
Hi everybody, I've got a request from my client to force an encoding in the browser, regardless what user have set. When I set encoding inside my filter to Windows-1257 in the HTML source code I see only ?s:??? ? ???. Is there any easy way to enforce browser to set proper encoding? May

Re: filter: How to set browser encoding?

2005-10-12 Thread Frank W. Zammetti
Mark, have a look here: http://javawebparts.sourceforge.net/javadocs/javawebparts/filter/CharacterEncodingFilter.html Just added that to JWP last weekend :) It essentially calls request.setCharacterEncoding() with whatever you configure. (Oops... ignore the description of the encodingScheme

issue with Filter

2005-09-09 Thread Mark
Hi, I have implemented the filter to add expire date (now + 1 day) on image. by dooing resp.setHeader(Cache-Control, max-age=86400); For some reason expire date set to system time ( It work yesterday, but not today very strange!) I didn't restart tomcat 5.0.28 (redaht 9) How can I check

Re: injecting a new request within a filter

2005-07-28 Thread Marten Lehmann
Hello, 1) You need to be running tomcat 5 2) See SRV.6.2.5 Filters and the RequestDispatcher in the servlet spec - it discusses exactly what you need to do. thanks, it works as I expected it to work now. Regards Marten -

injecting a new request within a filter

2005-07-27 Thread Marten Lehmann
Hello, from within a filter, I'm trying to do the following: request.getRequestDispatcher(req.getServletPath() + index.faces).forward(request, response); This works generally fine. The problem is, that attached filters simply aren't processed for this request. I have two filters in series

Re: injecting a new request within a filter

2005-07-27 Thread Tim Funk
1) You need to be running tomcat 5 2) See SRV.6.2.5 Filters and the RequestDispatcher in the servlet spec - it discusses exactly what you need to do. -Tim Marten Lehmann wrote: Hello, from within a filter, I'm trying to do the following: request.getRequestDispatcher(req.getServletPath

Tomcat filter to overwrite the requestURL of incoming httprequest object

2005-07-25 Thread Jaynika Barot
hi all, I want to write a filter which will overwrite the request URL in incoming httprequest. if incoming request's URI contains *./myservletName/extra1/extra2.* I want to reset it to *./myservletName?param1=extra1param2=extra2 and pass this request object to subsequent processing (filter

Re: Tomcat filter to overwrite the requestURL of incoming httprequest object

2005-07-25 Thread Martin Bromley
You have to wrap the HttpServletRequest with a class that overrides the methods relating to the URI. I've attached an abstract class that I wrote to make this a bit easier. You will have to implement the rewriteURL method to do the necessary String parsing. Then in your filter doFilter

Caching static content - Bug in Filter implementation?

2005-07-07 Thread juergen . dufner
Hello I do some further analysis in this problem and got following result: Precondition: The filter manipulates the HTTP header when returning a static resource (e.g. image). HTTP 200 In case of a HTTP 200 (OK) result the header is not added when the doFilter method is like following

Re: Caching static content - Bug in Filter implementation?

2005-07-07 Thread Jon Wingfield
of the header after this is too late. Jon [EMAIL PROTECTED] wrote: Hello I do some further analysis in this problem and got following result: Precondition: The filter manipulates the HTTP header when returning a static resource (e.g. image). HTTP 200 In case of a HTTP 200 (OK) result the header

Filter problem

2005-06-23 Thread Jack Lauman
I have the following code for an access filter. If I log in with the role of admin everything works as expected. If I try to log in with the role of user I immediately get a permissions error that denies access. I've added ${sessionScope.USER} to the jsp pages as well as adding entries

looking for java filter to block systematic downloading

2005-06-20 Thread Jose Blanco
I'm looking for a Java filter, designed to be used with Tomcat, to identify an IP address that appears to be rapidly downloading according to heuristics that I can setup, and block. There is a module like this for Apache that I am working with called mod_bwshare. Is there one for tomcat

newbie: invoking singlesignon from servlet filter

2005-05-30 Thread che
hi all! is it possible to invoke a singlesignon from a servlet filter? i'm using tomcat 4.1.24, the sso valve is up and running (successfully tested). but within a special usecase i can't use security constraints in web.xml, as the main servlet needs to be freely accessible. only certain

How to write a request decompressing input filter?

2005-05-18 Thread Jochen Wiedmann
Hi, while writing an input filter, that decompresses its input, I have encountered a problem. My filter (see complete source below) contains roughly the following code: private HttpServletRequest getServletRequest(final HttpServletRequest pRequest) { String contentEncoding

Realm and Filter question

2005-05-12 Thread Brett Parsons
Hi All, I've implemented a custom realm and a custom servlet filter for my webapp. The idea is, I want the filter to handle incoming requests for ALL resources within the webapp while the realm is only going to handle several resources within the webapp. The problem is, I need the filter

Images CSS not loaded after the request passes through a Servlet Filter

2005-04-28 Thread Roberto
Hi, I have a small java application, in which a servlet processes the request and then calls a JSP to present the data. Everything is OK with that configuration. Then, I decided to create a servlet filter, to redirect every request to that application, to a login page first. The code

Re: Images CSS not loaded after the request passes through a Servlet Filter

2005-04-28 Thread Frank W. Zammetti
Question: are the requests for images and CSS files also going through the filter? I'm wondering if those requests are getting forarded to the logon page too, which obviously wouldn't work. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com

Re: Images CSS not loaded after the request passes through a Servlet Filter

2005-04-28 Thread Roberto
Frank, You got it. The filter configuration, in the web.xml file, was intercepting ALL requests (url-pattern/*/url-pattern). I really thought that the filter would intercept only requests for Servlets, not all HTTP requests... Thanks ! This problem was really pissing me off... :) Regards

Re: IIS 6.0 with isapi_redirect.dll (jk 1.2.10) filter does not log page requests

2005-04-22 Thread Mladen Turk
Haris Papadopoulos wrote: IIS logs do not contain any information about the page that Tomcat serves. Instead, the following line: 2005-04-21 14:58:12 192.168.1.59 GET /jakarta/isapi_redirect.dll - 80 - 192.168.1.11

IIS 6.0 with isapi_redirect.dll (jk 1.2.10) filter does not log page requests

2005-04-22 Thread Haris Papadopoulos
IIS logs do not contain any information about the page that Tomcat serves. Instead, the following line: 2005-04-21 14:58:12 192.168.1.59 GET /jakarta/isapi_redirect.dll - 80 - 192.168.1.11 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+en-US;+rv:1.7.5)+Gecko/20041107+Firefox/1.0 - 200 0 0 appears each

Re: ssl-forwarding filter not working in IE 6

2005-04-17 Thread sudip shrestha
); response.setHeader(Cache-Control, max-age=0); - Jim -Original Message- From: sudip shrestha [mailto:[EMAIL PROTECTED] Sent: Friday, April 15, 2005 9:54 PM To: Struts Users Mailing List; Tomcat Users List Subject: ssl-forwarding filter not working in IE 6 Hi : I have

ssl-forwarding filter not working in IE 6

2005-04-15 Thread sudip shrestha
Hi : I have following code for automatic ssl-forwarding filter: public void doFilter(ServletRequest servletrequest, ServletResponse servletresponse, FilterChain filterchain) throws IOException, ServletException { String s = servletrequest.getScheme

Re: ssl-forwarding filter not working in IE 6

2005-04-15 Thread Jason Bainbridge
On 4/15/05, sudip shrestha [EMAIL PROTECTED] wrote: Hi : I have following code for automatic ssl-forwarding filter: Why do it that way? Why not just add transport-guarantee's in your web.xml and setup a redirect port for your http connector in your server.xml? eg. http://www.jguru.com/faq

Re: ssl-forwarding filter not working in IE 6

2005-04-15 Thread sudip shrestha
: On 4/15/05, sudip shrestha [EMAIL PROTECTED] wrote: Hi : I have following code for automatic ssl-forwarding filter: Why do it that way? Why not just add transport-guarantee's in your web.xml and setup a redirect port for your http connector in your server.xml? eg. http://www.jguru.com/faq

Re: ssl-forwarding filter not working in IE 6

2005-04-15 Thread sudip shrestha
to only those requests coming from outside the company intranet. On 4/15/05, Jason Bainbridge [EMAIL PROTECTED] wrote: On 4/15/05, sudip shrestha [EMAIL PROTECTED] wrote: Hi : I have following code for automatic ssl-forwarding filter: Why do it that way? Why not just add transport

Re: ssl-forwarding filter not working in IE 6

2005-04-15 Thread sudip shrestha
I disabled my filter and have tried this way, once again works with Firefox but not with IE, exact same results. On 4/15/05, Jason Bainbridge [EMAIL PROTECTED] wrote: On 4/15/05, sudip shrestha [EMAIL PROTECTED] wrote: Hi : I have following code for automatic ssl-forwarding filter: Why do

RE: ssl-forwarding filter not working in IE 6

2005-04-15 Thread Sng Wee Jim
; Tomcat Users List Subject: ssl-forwarding filter not working in IE 6 Hi : I have following code for automatic ssl-forwarding filter: public void doFilter(ServletRequest servletrequest, ServletResponse servletresponse, FilterChain filterchain) throws IOException, ServletException

filter mapping

2005-04-06 Thread Faine, Mark
Sorry this may be a little off-topic but is there a way to get the mapping for a filter. I'd like to determine what mapping set off the filter to use it to rewrite a URL. I know I can get the same information from the servlet request but then I'd have to parse it and that complicates things

Filter-mapping

2005-03-24 Thread Steve Farmer
5.0.28 to test my understanding. In one test I have the following filter-mapping ... dispatcherERROR/dispatcher ... /filter-mapping and I try to stimulate it with the following JSP %@ page errorPage=/filtex-dummy.do % ${10%0} %-- throw exception --% The servlet runs and receives the request

Filter-mapping

2005-03-23 Thread Steve Farmer
I've created a toy filter and servlet to experiment with filters in Tomcat 5.0.28. If I map the filter to the servlet like this filter-mapping ... dispatcherERROR/dispatcher ... /filter-mapping and invoke the following JSP %@ page errorPage=/filtex-dummy.do % ${10%0} %-- throw exception

5.5.7 Filter Issue

2005-03-02 Thread Peter Johnson
Hi all, I am including another context's servlet output however the filter that should be applied isn't. e.g. seems to be doing context1 context2 |--| |--| -- Filter -- Servlet -- Servlet

Re: 5.5.7 Filter Issue

2005-03-02 Thread Peter Johnson
Correction it is doing context1 context2 |--| |--| -- Filter -- Servlet -- Servlet | -- Servlet | Peter Johnson wrote: Hi all, I am including another context's servlet output however the filter

Re: 5.5.7 Filter Issue

2005-03-02 Thread Peter Johnson
After some further logging within the filter it would appear that the following is happening context1 context2 |--| |--| -- Filter -- Servlet -- Servlet | |---Filter -- Servlet ---| |-Filter -- Servlet -- Servlet

[OT] LogWatch filter for Tomcat

2005-03-01 Thread Cindy Ballreich
Has anyone written a Tomcat filter for the LogWatch log analysys tool? http://www2.logwatch.org:81/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

AW: filter question

2005-02-24 Thread Michael Südkamp
If you need an example how to modify the response, see http://java.sun.com/developer/EJTechTips/2002/tt0919.html#1. If you need a good lib that let you modify your HTML, e.g. inserting a hidden field into a form, see http://freshmeat.net/projects/jerichohtml/. Michael

filter question

2005-02-23 Thread Scott Purcell
Hello, I am having trouble with a filter. Code below. What I am trying to achieve is as follows: We have a current web-site, with a lot of jsp pages, etc. We are moving the code to a load-balanced environment, and I would like to put a hidden IP address into each display page. This way I can

Re: filter question

2005-02-23 Thread Peter Davison
Hi Scott. Your filter should probably set an attribute in the request or perhaps the session, that your jsp could display, rather than writing to the response's writer object. By opening up the writer and writing to it you are effectively setting the response to the request to be the contents

Re: filter question

2005-02-23 Thread Andre Van Klaveren
Peter, I don't think Scott wants to modify every JSP in his application. Sounds like he has a lot! Scott, the reason your filter isn't working is because the response from your servlets is getting sent to the client before your filter has a chance to add it's text to it (using the PrintWriter

RE: Does from a filter setCharacterEncoding work for tc-5.0.27?

2005-02-03 Thread Zsolt Koppany
Thank you, but we cannot move to 5.5.4. How can I do the same with tc-5.0.27? Zsolt -Original Message- From: A jie [mailto:[EMAIL PROTECTED] Sent: Thursday, February 03, 2005 2:44 AM To: tomcat-user@jakarta.apache.org Subject: RE: Does from a filter setCharacterEncoding work for tc

RE: Does from a filter setCharacterEncoding work for tc-5.0.27?

2005-02-03 Thread Guy Katz
i used TC 5.0.19,0.25,0.27 0.30 with a UTF-8 encoding filter (setting request and response encoding) and i never had any problems :) (and of course i use a language that cannot be represented with latin-1). -Original Message- From: Zsolt Koppany [mailto:[EMAIL PROTECTED] Sent: Thursday

Login filter

2005-02-03 Thread Ben Bookey
Dear List, I would like to perform an action after the user logs in to our app. We are using the tomcat Realm security model, with an Oracle database. So therefoer I am trying to implement a filter in Tomcat 4.1.27, which checks for all requests on the url /j_security_check I know my filter

RE: Does from a filter setCharacterEncoding work for tc-5.0.27?

2005-02-03 Thread Zsolt Koppany
(pn); log.debug(Parameter + pn + value: + pv + ); } } -Original Message- From: Guy Katz [mailto:[EMAIL PROTECTED] Sent: Thursday, February 03, 2005 10:17 AM To: Tomcat Users List Subject: RE: Does from a filter setCharacterEncoding work

Re: Login filter

2005-02-03 Thread Tim Funk
Filters cannot be run on j_security_check. -Tim Ben Bookey wrote: Dear List, I would like to perform an action after the user logs in to our app. We are using the tomcat Realm security model, with an Oracle database. So therefoer I am trying to implement a filter in Tomcat 4.1.27, which checks

AW: Login filter

2005-02-03 Thread Ben Bookey
got this idea from a ibm websphere help doc, where it is possible ! -Ursprungliche Nachricht- Von: Tim Funk [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 3. Februar 2005 12:41 An: Tomcat Users List Betreff: Re: Login filter Filters cannot be run on j_security_check. -Tim Ben Bookey

Re: AW: Login filter

2005-02-03 Thread Tim Funk
Your only recourse is to sse a Valve. (Which is just like a filter but tomcat specific) -Tim Ben Bookey wrote: Hi Tim, Apologies for hassling you again with this. Any idea without getting inside of the TC source, how I can write some code just b4 and after the user login validation

Re: AW: Login filter

2005-02-03 Thread Mario Winterer
Hi Ben! You cannot hook in the login validation process without touching tomcat code. But usually, this is not necessary. Just write a filter and map it to / - every request will be directed to your filter - except requests to j_security_check. But this should not bother you, because your

Does from a filter setCharacterEncoding work for tc-5.0.27?

2005-02-02 Thread Zsolt Koppany
Hi, Does setCharacterEncoding work under tc-5.0.27 with java-1.4.2-06? To get UTF-8 request parameter I need to do: String par = request.getParameter(filename); String filename = new String(par.getBytes(ISO8859-1), UTF-8); request.setCharacterEncoding(UTF-8) doesn't seem to help from a filter

RE: Does from a filter setCharacterEncoding work for tc-5.0.27?

2005-02-02 Thread A jie
-- MSN:[EMAIL PROTECTED] QQ:29967409 - From: Zsolt Koppany [EMAIL PROTECTED] Reply-To: Tomcat Users List tomcat-user@jakarta.apache.org To: 'Tomcat Users List' tomcat-user@jakarta.apache.org Subject: Does from a filter setCharacterEncoding work for tc

RE: IIS 5.0 + ISAPI filter + tomcat

2005-01-24 Thread Warron French
Ramien, I have checked and found that there was a virtual directory called tomcat (which is what the ISAPI filter is configured with. In the Vritual directory I have the following files: isapi_redirect_1.2.5.dll jboss-connector.reg uriworkermap.properties workers.properties Here

Re: RE: IIS 5.0 + ISAPI filter + tomcat

2005-01-24 Thread bounce
Geachte relatie, Het door u gebruikte e-mailadres is niet meer actief. U kunt uw e-mailbericht sturen naar [EMAIL PROTECTED] of dit bericht beantwoorden. Bedankt voor uw medewerking, Met vriendelijke groet, ATP Hypotheken Het Spoor 40 3994 AK Houten Tel. 030 750 25 33 Fax. 030 750 25 88

RE: RE: IIS 5.0 + ISAPI filter + tomcat

2005-01-24 Thread Warron French
: Monday, January 24, 2005 10:25 AM To: tomcat-user@jakarta.apache.org Subject: Re: RE: IIS 5.0 + ISAPI filter + tomcat Geachte relatie, Het door u gebruikte e-mailadres is niet meer actief. U kunt uw e-mailbericht sturen naar [EMAIL PROTECTED] of dit bericht beantwoorden. Bedankt voor uw

Re: RE: RE: IIS 5.0 + ISAPI filter + tomcat

2005-01-24 Thread bounce
Geachte relatie, Het door u gebruikte e-mailadres is niet meer actief. U kunt uw e-mailbericht sturen naar [EMAIL PROTECTED] of dit bericht beantwoorden. Bedankt voor uw medewerking, Met vriendelijke groet, ATP Hypotheken Het Spoor 40 3994 AK Houten Tel. 030 750 25 33 Fax. 030 750 25 88

IIS 5.0 + ISAPI filter + tomcat

2005-01-21 Thread Warron French
/programs/opre/hsrc/ I redirect to http://www.acf.hhs.gov/programs/core/hsrc/. When however, I remove the ISAPI filter called tomcat which is basically the isapi_redirect_1.2.5.dll I can get my redirection to go to the site http://www.acf.hhs.gov/programs/opre/hsrc/, but then the links on that site

Handling Exceptions thrown from a Filter

2005-01-18 Thread Wendy Smoak
If a ServletException is thrown from a Filter, is there a way to show a nice error page? I have put this in web.xml: error-page exception-typejavax.servlet.ServletException/exception-type location/WEB-INF/jsp/exceptionServlet.jsp/location /error-page which I thought

Re: Handling Exceptions thrown from a Filter

2005-01-18 Thread Larry Meadors
is this before or after the call to the filter chain? On Tue, 18 Jan 2005 15:51:01 -0700, Wendy Smoak [EMAIL PROTECTED] wrote: If a ServletException is thrown from a Filter, is there a way to show a nice error page? I have put this in web.xml: error-page exception

Re: Handling Exceptions thrown from a Filter

2005-01-18 Thread Wendy Smoak
From: Larry Meadors [EMAIL PROTECTED] On Tue, 18 Jan 2005 15:51:01 -0700, Wendy Smoak [EMAIL PROTECTED] wrote: If a ServletException is thrown from a Filter, is there a way to show a nice error page? is this before or after the call to the filter chain? The exception is thrown before I

RE: Filter/...

2004-12-06 Thread Shapira, Yoav
Hi, The Servlet Spec v2.4, which Tomcat 5.x implements, provides an answer to your problem: add a forward/include directives to your filter-mapping. See SRV.13.1 for the syntax and examples. Yoav Shapira http://www.yoavshapira.com -Original Message- From: QM [mailto:[EMAIL PROTECTED

Filter/...

2004-12-04 Thread Brij Naald
Hi, I need to run a class everytime before a servlet is started. One option is to make a filter, the problem here is that a filter doesn't get called when a servlet is invoked via the requestDispatcher. Is there another solution for this problem

RE: Filter/...

2004-12-04 Thread Freddy Villalba A.
Hi Brij, I am not sure I have fully understood your question. In any case, I believe that for accomplishing what you've stated you have 2 options: - Use a listener class (it's like a filter, but it's automatically invoked by the servlet container on the ocurrence of different kinds of events

RE: Filter/...

2004-12-04 Thread Brij Naald
a filter in front of it. When a request comes in, the filter does: newrequest= new RequestWrapper(request); chain.doFilter(newrequest, response); That way the servlet is invoked with a wrapper around the request. Until now, this approach works. Now comes the problem: the filter also does some

RE: Filter/...

2004-12-04 Thread Freddy Villalba A.
Interesting issue. Anyway, can't think of anything that solves it in a clean way. If you give me (if you can) further information about what your filter does, I could give it a try at thinking about an alternative solution. Cheers, F. -Mensaje original- De: Brij Naald [mailto:[EMAIL

Re: Filter/...

2004-12-04 Thread QM
On Sat, Dec 04, 2004 at 05:56:15PM +, Brij Naald wrote: : The filter I have now, always get called when there is an incoming request. : But when a servlet uses a requestdispatcher to include another servlet, the : filter doesn't get called. This makes sense: filters are for external

Re: Q: ISAPI filter for JK 1.2.7-beta Visual C++ requirements

2004-12-01 Thread David Boyer
Thanks! That did the trick. I have the latest version of Visual Studio .Net on another system, and it sounds like it'd be better to use to get the full logger features. [EMAIL PROTECTED] 12/1/2004 1:05:19 AM David Boyer wrote: I'm attempting to build this from source, and I'm getting several

Re: Q: ISAPI filter for JK 1.2.7-beta Visual C++ requirements

2004-12-01 Thread Mladen Turk
David Boyer wrote: Thanks! That did the trick. I have the latest version of Visual Studio .Net on another system, and it sounds like it'd be better to use to get the full logger features. Yes. I think that VC6 has done it's part of the job. One tip... You can use VC6 and download free vctoolkit

Q: ISAPI filter for JK 1.2.7-beta Visual C++ requirements

2004-11-30 Thread David Boyer
I'm attempting to build this from source, and I'm getting several errors related to an undeclared identifier '__FUNCTION__'. Visual C++ 7 supports __FUNCTION__, but VC++ 6.0 does not. Does anyone know if this is an intended change in the build requirements, or am I just doing something wrong?

Re: Q: ISAPI filter for JK 1.2.7-beta Visual C++ requirements

2004-11-30 Thread Mladen Turk
David Boyer wrote: I'm attempting to build this from source, and I'm getting several errors related to an undeclared identifier '__FUNCTION__'. Visual C++ 7 supports __FUNCTION__, but VC++ 6.0 does not. Does anyone know if this is an intended change in the build requirements, or am I just

classpath of a filter

2004-11-26 Thread Brij Naald
Hi, i'm creating a filter which needs to know if the request is an instance of org.apache.catalina.connector.RequestFacade. When executing the 'if (request instanceof RequestFacade)' the program gives an error for that line: java.lang.NoClassDefFoundError: org/apache/catalina/connector

How to add a request filter for TC5.5.3? It was working for TC5.0.29!

2004-11-26 Thread David Lee
Dear Folks, I have a test request filter on TC5.0.29. It is defined in server.xml as follows and it works: conf\server.xml: Context path= docBase=ROOT debug=0 Valve className=com.oreilly.tomcat.valves.BadInputFilterValve deny=\x00,\x04,\x08,\x0a,\x0d/ /Context How do I move

Re: How to add a request filter for TC5.5.3? It was working for TC5.0.29!

2004-11-26 Thread Bill Barker
PROTECTED] wrote in message news:[EMAIL PROTECTED] Dear Folks, I have a test request filter on TC5.0.29. It is defined in server.xml as follows and it works: conf\server.xml: Context path= docBase=ROOT debug=0 Valve className=com.oreilly.tomcat.valves.BadInputFilterValve deny=\x00,\x04,\x08,\x0a

Re: How to add a request filter for TC5.5.3? It was working for TC5.0.29!

2004-11-26 Thread Remy Maucherat
On Fri, 26 Nov 2004 15:14:27 -0800, David Lee [EMAIL PROTECTED] wrote: Dear Folks, I have a test request filter on TC5.0.29. It is defined in server.xml as follows and it works: conf\server.xml: Context path= docBase=ROOT debug=0 Valve className

RE: How to add a request filter for TC5.5.3? It was working for TC5.0.29!

2004-11-26 Thread David Lee
] Subject: Re: How to add a request filter for TC5.5.3? It was working for TC5.0.29! Valves (and other custom components, like Realms) written for TC 5.0.x will at the very least have to be re-compiled to work for TC 5.5.x. More likely, there will have to be code changes to make them work. That's just

RE: How to add a request filter for TC5.5.3? It was working for TC5.0.29!

2004-11-26 Thread David Lee
Message- From: Remy Maucherat [mailto:[EMAIL PROTECTED] Sent: Friday, November 26, 2004 3:31 PM To: Tomcat Users List Subject: Re: How to add a request filter for TC5.5.3? It was working for TC5.0.29! On Fri, 26 Nov 2004 15:14:27 -0800, David Lee [EMAIL PROTECTED] wrote: Dear Folks, I

Re: classpath of a filter

2004-11-26 Thread Tim Funk
You'd have to let your web app also be able to use the server classloader. You can do this by setting server=true in the Context declaration. That being said - whatever your trying to do is probably a very bad idea. -Tim Brij Naald wrote: Hi, i'm creating a filter which needs to know

Filter Problem

2004-11-23 Thread Jack Lauman
I have an access control filter that is supposed to grant all access to users wirh the role of 'admin' and limited access to those with the role of 'user. Specifically a 'user' can only manipulate the data that belongs to them. It uses 'contextPath.startsWith' and the users 'id' (int) from

Re: Filter Problem

2004-11-23 Thread Tim Funk
getContextPath is the path name of the webapp. For example, if my webapp is registered at /more. Then my contextPath is /more. If I request /more/cowbell.jsp. The contextPath is /more and the servletPath is /cowbell.jsp. -Tim Jack Lauman wrote: I have an access control filter that is supposed

Re: Filter Problem

2004-11-23 Thread Jack Lauman
is /cowbell.jsp. -Tim Jack Lauman wrote: I have an access control filter that is supposed to grant all access to users wirh the role of 'admin' and limited access to those with the role of 'user. Specifically a 'user' can only manipulate the data that belongs to them. It uses 'contextPath.startsWith

Re: Filter Problem

2004-11-23 Thread Tim Funk
contextPath is /more. If I request /more/cowbell.jsp. The contextPath is /more and the servletPath is /cowbell.jsp. -Tim Jack Lauman wrote: I have an access control filter that is supposed to grant all access to users wirh the role of 'admin' and limited access to those with the role of 'user

Re: Filter Problem

2004-11-23 Thread Jack Lauman
. For example, if my webapp is registered at /more. Then my contextPath is /more. If I request /more/cowbell.jsp. The contextPath is /more and the servletPath is /cowbell.jsp. -Tim Jack Lauman wrote: I have an access control filter that is supposed to grant all access to users wirh the role

Q: valve versus filter

2004-11-17 Thread David Boyer
We're using IIS 6 with the JK2 ISAPI filter (Tomcat 5.0.28). I have several filters that I'm using on almost every context in production: an authentication filter, an access-control filter, and a compression filter. I'd be interested in implementing these things at a more global level rather

RE: valve versus filter

2004-11-17 Thread Shapira, Yoav
Hi, Valves have the advantage that you can define them (once) for an entire Host, so they apply to all the applications on the Host. However, they are Tomcat-specific, unlike Filters, so their portability is limited. The Servlet Spec provides for no way to define a Filter for multiple web apps

Re: valve versus filter

2004-11-17 Thread Filip Hanik - Dev
filter = portable standard valve = tomcat specific - Original Message - From: David Boyer [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, November 17, 2004 11:48 AM Subject: Q: valve versus filter We're using IIS 6 with the JK2 ISAPI filter (Tomcat 5.0.28). I have several

Filter tricks in tomcat

2004-11-09 Thread Pablo Carretero
Hi, I’m working with Tomcat 5 from 3 months ago. I understand the filter architecture, but I cannot capture the response filter for my JSP and servelt. Tomcat 5 is Servlet 2.4, so I thing it can filter either request or response. What I can do, is capture the entire request and its

Re: [FIXED] jndi realm filter problem

2004-11-09 Thread Xavier Renard
$ --- * @version $Revision: 1.16 $ $Date: 2003/12/12 21:31:56 $ 1295c1343,1344 String filter = roleFormat.format(new String[] { doRFC2254Encoding(dn), username }); --- String filter = roleFormat.format(new String[] { dn, username }); filter = doRFC2254Encoding(filter); so

RE: Filter tricks in tomcat

2004-11-09 Thread Shapira, Yoav
Hi, I assume that when you say capture you mean handle ? Or maybe wrap? To only handle outgoing (response) data in a filter, do something like this: public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws Blah { chain.doFilter(request, response

Re: Filter tricks in tomcat

2004-11-09 Thread Peter Lin
actually, you can use filters to capture the response and then use a filter to dump the whole thing to the outputstream. What you'll have to do is create your own buffer to hold the content and not write to either the jspwriter or the printwriter in the servlet. the tricky part is this. if you

jndi realm filter problem

2004-11-08 Thread Xavier Renard
it with the tar.gz of tomcat-4.1.30 and tomcat-5.0.28 and it works perfectly well. However,with the debian package, my filter (rolesearch) become (?=undefined) sample from log -- conn=7 op=5 SRCH base=ou=groups,dc=example,dc=org scope=1 filter=(?=undefined) I have to use the debian

Re: Filter, HttpServletResponseWrapper, ServletOutputStream PrintWriter in Tomcat 5.x

2004-10-31 Thread Giampaolo Tomassoni
Never mind: was a buffering issue. The JspWriter uses HttpServletResponseWrapper#flushBuffer() call, which I didn't override. Thanks anyway, Giampaolo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Filter, HttpServletResponseWrapper, ServletOutputStream PrintWriter in Tomcat 5.x

2004-10-30 Thread Giampaolo Tomassoni
Dears, I'm having troubles in doing a page hit counter Filter wrapping HttpServletResponse(s) with the purpose of obtaining the count of emitted bytes. In my specialization of the HttpServletResponseWrapper I basicly catch getOutputStream() requests wrapping the ServletOutputStream returned

Resticting Access via a Request Filter

2004-10-29 Thread Acácio Furtado Costa
HI all, I have only one TomCat Application Server and I need to offer some Applications to the Internet and deny to others. I look for some Valves and found a RemoteAddrValve, but looking in the documentation, it is Setup in the SERVER.XML and it is valid for all host and all

Re: Resticting Access via a Request Filter

2004-10-29 Thread Tim Funk
Inside the Context declaration you may also declare Valves. -Tim Acácio Furtado Costa wrote: HI all, I have only one TomCat Application Server and I need to offer some Applications to the Internet and deny to others. I look for some Valves and found a RemoteAddrValve, but looking

Re: Including Zip functionality in a filter...

2004-10-22 Thread Ben Bookey
HI Tim // Don't worry about writing a compression filter - tomcat comes with one on its HTTP connector. // Or if your using apache - use mod_gzip. I here the latest IIS also has compression support. Thanks ALOT for the suggestion. We are just using Tomcat 4.1 and Tomcat 5, is this still

RE: Including Zip functionality in a filter...

2004-10-22 Thread Shapira, Yoav
Hi, // Don't worry about writing a compression filter - tomcat comes with one on its HTTP connector. Thanks ALOT for the suggestion. We are just using Tomcat 4.1 and Tomcat 5, is this still possible. Could you send me an example how to use the HTTP Connector. Look at http

RE: Including Zip functionality in a filter...

2004-10-22 Thread Dave Been
functionality in a filter... Hi, // Don't worry about writing a compression filter - tomcat comes with one on its HTTP connector. Thanks ALOT for the suggestion. We are just using Tomcat 4.1 and Tomcat 5, is this still possible. Could you send me an example how to use the HTTP Connector

RE: Including Zip functionality in a filter...

2004-10-22 Thread Shapira, Yoav
Hi, I looked at the docs and added to my 8080 non-SSL Connector in server.xml (tomcat 4.1.3) the following: compression=force compressableMimeType=text/html,text/xml,*/* Look at the docs again. The attributes for Tomcat 4.1 and 5.x are different. The former doesn't have a

RE: Filter question in 4.1.18, can my filter get unchunked and un zipped requests?

2004-10-22 Thread Donie Kelly
: Filter question in 4.1.18, can my filter get unchunked and unzipped requests? Donie Kelly [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi all I've been reading up on filters to see if I can find a solution to an annoying problem. I can't find it so I'm looking here. I have

RE: Including Zip functionality in a filter...

2004-10-22 Thread Dave Been
PROTECTED] 10/22/2004 09:27 AM Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:RE: Including Zip functionality in a filter... Hi, I looked at the docs and added to my 8080 non-SSL Connector in server.xml (tomcat 4.1.3

Filter question in 4.1.18, can my filter get unchunked and unzipp ed requests?

2004-10-21 Thread Donie Kelly
Hi all I've been reading up on filters to see if I can find a solution to an annoying problem. I can't find it so I'm looking here. I have this http filter that messes with the http request and response before it enters and leaves tomcat. The problem is that this filter works at a fairly

Re: Filter question in 4.1.18, can my filter get unchunked and unzipped requests?

2004-10-21 Thread Bill Barker
Donie Kelly [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi all I've been reading up on filters to see if I can find a solution to an annoying problem. I can't find it so I'm looking here. I have this http filter that messes with the http request and response before

Including Zip functionality in a filter...

2004-10-20 Thread Ben Bookey
Dear list, I have seen an example of using a filter, to Zip/compress the outgoing request. This for me is an exciting way of speeding up the load time for my webApp. ( For those who dont know, most internet browsers have an integrated unzip function, so a server can send the client a zipped

Re: Including Zip functionality in a filter...

2004-10-20 Thread Tim Funk
If your traffic is going across the internet (or a corporate WAN) - then you probably want to zip your output. If your traffic is all LAN based - compression will probably not make much of a difference. Don't worry about writing a compression filter - tomcat comes with one on its HTTP

  1   2   3   4   5   6   7   >