From users-return-267699-archive-asf-public=cust-asf.ponee.io@tomcat.apache.org Fri Jun 14 20:10:49 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 2870918062F for ; Fri, 14 Jun 2019 22:10:49 +0200 (CEST) Received: (qmail 93666 invoked by uid 500); 14 Jun 2019 20:10:45 -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 93654 invoked by uid 99); 14 Jun 2019 20:10:45 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Jun 2019 20:10:45 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id F1E95C0801 for ; Fri, 14 Jun 2019 20:10:44 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.062 X-Spam-Level: ** X-Spam-Status: No, score=2.062 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, GB_FROM_NAME_FREEMAIL=0.01, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id AymhdDrM6Vsx for ; Fri, 14 Jun 2019 20:10:43 +0000 (UTC) Received: from mail-ot1-f54.google.com (mail-ot1-f54.google.com [209.85.210.54]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 76E505F524 for ; Fri, 14 Jun 2019 20:10:43 +0000 (UTC) Received: by mail-ot1-f54.google.com with SMTP id r21so898093otq.6 for ; Fri, 14 Jun 2019 13:10:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=lcuoN5/ugR8r5Mt9vpQJVV2BYigL8+VtVjI3I2I7cro=; b=ow/y/aDfSXhw2XLuRQEUKcojae/8IqtPhz4VZlXOAFK67ZT5itBTA7hWknf4Ffc1nx /kUoa1oX+/IM38aj3VU7Ej0yy9SLrzu6Eoygz/cKx72tA7JtQMX1R8SjazsKPLjw2ork r8NL2ZySDVTtKffy+WVibuq5oPD/xUC4A1hztuwEvOSQIgY7ZYNl8XgpORPKGasEPLIs HC3TAUQkD5XCPsOwO26uAXIIOnzDWzn51QCEV2O1Wyv0k2q43GwNpECDx5R8GHotttV2 zog5VDmdtTeSww6TQqsjIbYmWNx3KqTaoKlCJNLvwuiHYIAtMxrAaC4B6ll61LQdsQEu gohw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=lcuoN5/ugR8r5Mt9vpQJVV2BYigL8+VtVjI3I2I7cro=; b=AipokN1x7CH5ywMrvle/ljDPYFkrPuVql7Msa5NkbBMqgp+u/S55MkqzaAmex9y4M4 mTY+q1CVtV61lCNV5CqNcnF0QV8jhYJK6GXmOk/nNpj25a/5MSkHedKukzA2+pq/FOJC 6FMN1995ReAk6oS69QPZdZp+th2GJAVBC7bJlQIFpYe4ECz+Jiex51jSI6YdYg7TEyh/ rxdvi3jwIfhW8/PryeshMqjjWEXEjWyrtCn/q3lHw/gWR2dCR+cqgLU+2QOKkritSiRv sXeHGmhTw0aTbxT2KfW+qr6vZ1AaZXMagw/2KSFM0IBZ2Enykm+2t1OBnBN8NNzLYhTW ainA== X-Gm-Message-State: APjAAAWMIiXCnLxY3uvTdZX9SQJI7YUdZdAdJw6C9gRmU3+Vgk2Nh8Ap pTd3nZXqhNhufp6/96ZlsvFLOqPWHX+cLeU6M/eLOtrVUvw= X-Google-Smtp-Source: APXvYqzN5wL0m/4E3UdbG1lFE5hkly53YBcQj6YVEQtAmItFACu8kvgb5ycWd20SinVu0LGZjlGxxAkV2/NJg6N7Rqk= X-Received: by 2002:a9d:6f03:: with SMTP id n3mr7773483otq.283.1560543036848; Fri, 14 Jun 2019 13:10:36 -0700 (PDT) MIME-Version: 1.0 From: Tommy Pham Date: Fri, 14 Jun 2019 13:10:26 -0700 Message-ID: Subject: TC 9.0.21: ContextListener + Servlet app To: Tomcat Users List Content-Type: multipart/alternative; boundary="0000000000005e3f0d058b4e3d90" --0000000000005e3f0d058b4e3d90 Content-Type: text/plain; charset="UTF-8" Hello everyone, I'm trying to write a lightweight and hopefully simple ContextListener + Servlet application but running into 2 issues I'm unable to find resolution for and hoping someone would please point me in the right direction: 1) I'd like to have Tomcat's default servlet serve HTML files only within directory /path/ and its' subdirectories. However, I can only get it to work with this URL mapping "/path/*". My understanding is that the default servlet will serve any files within /path/. Can this be done with URL path mapping or do I need to write a custom filter? My servlet's mapping is "/". Tomcat's default servlet mapping has "/css/*", "/js/*", "/img/*", and "/path/*". 2) I Have this small and simple HTML form:

My servlet's doPost is triggered but when I iterate the request.getParameterMap(), it's empty. When I tried to request.getParameter("text"), it returned 'null'. I do have a filter in place but it's only to log all request access to a database backend eventually. That filter is currently dumping it to log. I've tried disabling the filter but have the same result. Thank you, Tommy --0000000000005e3f0d058b4e3d90--