Return-Path: X-Original-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Delivered-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CD2B5F676 for ; Wed, 1 May 2013 10:22:23 +0000 (UTC) Received: (qmail 51871 invoked by uid 500); 1 May 2013 10:22:23 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 51336 invoked by uid 500); 1 May 2013 10:22:17 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 51125 invoked by uid 99); 1 May 2013 10:22:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 May 2013 10:22:15 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of sindhi.for@gmail.com designates 209.85.210.178 as permitted sender) Received: from [209.85.210.178] (HELO mail-ia0-f178.google.com) (209.85.210.178) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 May 2013 10:22:10 +0000 Received: by mail-ia0-f178.google.com with SMTP id j38so1221274iad.37 for ; Wed, 01 May 2013 03:21:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=/TFYf9FOuTs//4ytStVYYrsPwYoX36VN+QcblPkw+OU=; b=pLCR7dEe4o1FPq+kR/7HUakdUf7qnyHkx8ZaXpTgtYisbHSDv2ZzfuyFR/ziJE1BZv D45tfyfKom3i9MmXyqMj0KXMAEHbvQNCp3lBs7dwshGi6VkLYUI1S4GiY5A/hDK+Ma/l jqZKf6tNx3px5Bz3DPgCGhXV1+I/W6RZIb44yyOpayEjbi2p+aFHuIpKmwmQPMzp33OF hpuxWsDg5rWs9xQl8tJuaeszL3xmbEfWsawv74J8fOZbOIWVTNCqgT/0muNI3xuQp4bG pT6iTWuanYISD00L/q/Qp7ttkCkdjOVhKK+nlugiagBs69pNweDthcdbmvxzyanKiok8 2Qpg== MIME-Version: 1.0 X-Received: by 10.43.47.5 with SMTP id uq5mr1212592icb.0.1367403709733; Wed, 01 May 2013 03:21:49 -0700 (PDT) Received: by 10.64.93.100 with HTTP; Wed, 1 May 2013 03:21:49 -0700 (PDT) Date: Wed, 1 May 2013 15:51:49 +0530 Message-ID: Subject: Apache C++ equivalent of javax.servlet.Filter From: Sindhi Sindhi To: modules-dev@httpd.apache.org Content-Type: multipart/alternative; boundary=bcaec52e6005627db004dba57cfa X-Virus-Checked: Checked by ClamAV on apache.org --bcaec52e6005627db004dba57cfa Content-Type: text/plain; charset=ISO-8859-1 Hi, I'm developing a C++ module for Apache(httpd.exe) server. This C++ module intends to function the same as a Java module that we earlier developed for Tomcat. I'll be very thankful to you if you could answer the following queries I have about finding the Apache(httpd.exe server) C++ equivalents for the below Java classes. This Java code has references to the following - 1. javax.servlet.Filter In Java we have a class CustomFilter that implements javax.servlet.Filter. This CustomFilter class has an init() method that will be called when Tomcat starts. How can I achieve this for Apache(httpd.exe server)? means, how can I make a function call when Apache(httpd.exe server) starts. 2. javax.servlet.FilterConfig The above mentioned init() method takes in an argument of type FilterConfig. What is the Apache C++ equivalent of FilterConfig? 3. The interface javax.servlet.Filter also has the method doFilter(ServletRequest request, ServletResponse response, FilterChain chain). In Apache C++ I can get the filter chain using the structure ap_filter_t. But how will I get the objects of ServletRequest/HttpServletRequest and ServletResponse/HttpServletResponse in C++ module? Means what are the corresponding structures I can access in Apache C++ module. The main filter callback function in my C++ module looks like this - EXTERN_C_FUNC apr_status_t filterOutFilter ( ap_filter_t *filterChain, apr_bucket_brigade *inBucketList) Thanks. --bcaec52e6005627db004dba57cfa--