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 07FDE112BF for ; Mon, 13 May 2013 04:01:06 +0000 (UTC) Received: (qmail 33273 invoked by uid 500); 13 May 2013 04:01:03 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 32955 invoked by uid 500); 13 May 2013 04:01:01 -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 32931 invoked by uid 99); 13 May 2013 04:01:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 May 2013 04:01:00 +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 zhengyang4k@gmail.com designates 209.85.220.179 as permitted sender) Received: from [209.85.220.179] (HELO mail-vc0-f179.google.com) (209.85.220.179) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 May 2013 04:00:55 +0000 Received: by mail-vc0-f179.google.com with SMTP id hz10so5007521vcb.24 for ; Sun, 12 May 2013 21:00:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=RH3NzVq5Afpv+cG2zULmrSxMJYi9XH+2Y1VAfrP9uVw=; b=gRVfOf1Vs56u07htFqYC4ToWHtzp5z39N2pEL5MtZS5NrJW3v73KbXjshPJwdKazat YbsY+t0Nt7EuoV2UZQ1+Qcq0PZ29az1tYRpUA9CybYeEdOx6jNZpwF+uNmGDjKoI1bSk a71CzPwL0TsYRAJaJpdbLs2/qZQo2KWqCfb5nO6rgHRxt98ojJAwwRZwgssKPrmxxkyp ZzSAKlw/ELL9q2FoMH179f6yG4HOUmq6eEcBFitB7wEGlI6ttBf4vzBSqFYlRk9s2suW 47C/DbOV03AfbH7q327g3TWn37QAVYhSNJeakjP/KJcjqZNzEJ5NNl5ycCaZYzEJF1Wn EEMg== MIME-Version: 1.0 X-Received: by 10.52.70.8 with SMTP id i8mr14497870vdu.126.1368417634569; Sun, 12 May 2013 21:00:34 -0700 (PDT) Received: by 10.58.250.198 with HTTP; Sun, 12 May 2013 21:00:34 -0700 (PDT) In-Reply-To: References: Date: Mon, 13 May 2013 12:00:34 +0800 Message-ID: Subject: Re: Tomcat 7 Application Context root url mapping broken after reload. From: Zheng Yang To: Tomcat Users List Content-Type: multipart/alternative; boundary=20cf307d0528035a7204dc918fe8 X-Virus-Checked: Checked by ClamAV on apache.org --20cf307d0528035a7204dc918fe8 Content-Type: text/plain; charset=ISO-8859-1 Thanks for the info. If it happens as you describe it, then it should be a bug. Please file > an issue in Bugzilla. > http://tomcat.apache.org/bugreport.html#How_to_write_a_bug_report > > I've filed a bug here: https://issues.apache.org/bugzilla/show_bug.cgi?id=54955 > Can you attach to your report a simple web application, with source > code, that reproduces the issue? > > Two questions: > a) Is it specific to the context root (empty string) mapping? > Yes, only the empty string mapping will broke while the others are OK. > b) Is it specific to annotations? (Does it work if you specify the > mapping in web.xml)? > > Nope, both annotations and DD fail. > BTW, support for such mappings was added to Tomcat 7 rather late (in > 7.0.28 - bug 53356 ). Apparently they are no so widely used. > > > If this is the case, what is considered as best practice when I need a servlet to handle context root? The function I'm trying to achieve is a 2-face context root: For logged-in users, show home.jsp with params passed from root servlet. For users not logged-in, show index.jsp. -- ------ Regards, Zheng Yang --20cf307d0528035a7204dc918fe8--