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 F1FD19126 for ; Wed, 25 Jan 2012 18:36:22 +0000 (UTC) Received: (qmail 20852 invoked by uid 500); 25 Jan 2012 18:36:19 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 20660 invoked by uid 500); 25 Jan 2012 18:36:18 -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 20649 invoked by uid 99); 25 Jan 2012 18:36:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jan 2012 18:36:18 +0000 X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=FREEMAIL_FORGED_REPLYTO,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [98.139.44.154] (HELO nm27.access.bullet.mail.sp2.yahoo.com) (98.139.44.154) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 25 Jan 2012 18:36:08 +0000 Received: from [98.139.44.104] by nm27.access.bullet.mail.sp2.yahoo.com with NNFMP; 25 Jan 2012 18:35:46 -0000 Received: from [98.139.44.65] by tm9.access.bullet.mail.sp2.yahoo.com with NNFMP; 25 Jan 2012 18:35:46 -0000 Received: from [127.0.0.1] by omp1002.access.mail.sp2.yahoo.com with NNFMP; 25 Jan 2012 18:35:46 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 384455.9126.bm@omp1002.access.mail.sp2.yahoo.com Received: (qmail 16541 invoked by uid 60001); 25 Jan 2012 18:35:45 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1327516545; bh=EzZNLVNWQDU1CUGWd8eCXG6dkfAY/8rZ653OpkQU7Ag=; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=dWjVFG4fCtUc5spC1KZaPel7zaMPAWmVtyf03buBEUm63h4tR9gVZ/xuJBJYXxLEJRarJMk8PlEvTt0C1Ba/jSFhkd8GiFxA9vgJjy/rH1akL4pKVnSiiFu3n9yP6A8YaT0txUUHlC/xWjyftrGPZMi8l5wfZ5WZMv5eW9S7+qE= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=xbAbmHyOfFBh/4bvUbH5BdTWA1nwPA9EPWZexe8fq+0/3RS0/sOXscl0v91NJQWj9U5EFf3YINN40WNu83gCxIy2awbwHECqdRubZA2lB8LvEvuhmOn3y1fA6xJEDl5aWDtvJe6eTk/+1AYnROeO2nRRkkQFiGIrCriVME0DXts=; X-YMail-OSG: 6GnHOuUVM1lpq.BCWgNJP9xveZspP9hSiy1yFfNqFYsg0Qp nD3cA8yizaK777s3GK2o_PfYNz2X4deUGR1dQES4LaWiptbGQ6Wq.F2bAlCT WTeB6NtkGBpJe7qLGtfvoW7N8q5GO7h0qjMstJAL7tjIZOBac4ruqxNu0XGg cWPq67pyucLu8zG0bHcf7G0UzSb9gAATA2t9RGxZPdn9BQwlzLr3ztB2mGRA iXQusGfYSNHgT50NXn9Ag8zGkf1pFi5p74GXtMrdbSwukvXk2I7JlwZjCplF g7MqRn2TIcBhPNUwBlcD.VLCT7gAiJMiVLVsuJGcdZO0dizGba4_MEcAKrRT qMSS31I04mMsEJJyJhasM1p9tZjqlgFDIg3IMSWlbDd3wpNPcc8.L8Ij3HCA uSj.8R_oMt6dr4Nzngp6xaRp5YIcISStxdbT8dA8b9fyZoSFYCfX8eBovfhW KR_Cb3QCX_OQ2AFN6ivOdzDf.OTZtm.mIcRBibUpOLA_eetwtJYT2V9oFV5m N55e1wA9z6kM- Received: from [99.71.199.81] by web181610.mail.ne1.yahoo.com via HTTP; Wed, 25 Jan 2012 10:35:45 PST X-Mailer: YahooMailClassic/15.0.4 YahooMailWebService/0.8.116.331537 Message-ID: <1327516545.326.YahooMailClassic@web181610.mail.ne1.yahoo.com> Date: Wed, 25 Jan 2012 10:35:45 -0800 (PST) From: removeps-code@yahoo.com Reply-To: removeps-code@yahoo.com Subject: Re: not able to access URL in 2nd app in 7.0.23 To: Tomcat Users List , removeps-code@yahoo.com In-Reply-To: <1327511449.1048.YahooMailClassic@web181619.mail.ne1.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org OK here's what I tried: I removed https. A request through Firefox to htt= p://localhost:6144/myapp/folder/action.do still gives 404. I overrode doGe= t of the servlet class to print whether get/post and the request.getRequest= URI and it is=0A=0Aget /myapp/folder/action.do=0A=0AThis is the same as bef= ore. My servlet has code like this=0A=0A if (uri.equals("/myapp/folde= r/action.do"))=0A=0Ain the doPost method so it would process this action.= =0A=0ASo the problem has to do with https. I put the security-constraint s= tuff back in but removed the auth-constraint, so everything is https but re= quires no authentication. What gets printed when you go to https://localho= st:6143/myapp/folder/action.do is still=0A=0Aget /myapp/folder/action.do=0A= =0ASo the issue is with the auth-constraint.=0A=0AIn my real code, my code = makes a POST request to the given URL. I re-ran this test:=0A=0ASo now it = looks like the issue is this:=0A=0A(a) In 7.0.22 and earlier versions my co= de made a POST request to https://localhost:6143/myapp/folder/action.do.=0A= (b) Tomcat made a POST request to the login page https://localhost:6143/mya= pp/login.html=0A(c) My servlet got called, and the doPost method of the ser= vlet got called.=0A=0ABut in 7.0.23 (b) Tomcat is making a GET request to h= ttps://localhost:6143/myapp/login.html=0A=0AThus I must move/copy my code i= n doPost to build login.html into doGet.=0A=0AThis did work.=0A=0A--- On We= d, 1/25/12, removeps-code@yahoo.com wrote:=0A=0A>= From: removeps-code@yahoo.com =0A> Subject: Re: n= ot able to access URL in 2nd app in 7.0.23=0A> To: "Tomcat Users List" =0A> Date: Wednesday, January 25, 2012, 9:10 AM=0A> Re= plies in place=0A> =0A> --- On Wed, 1/25/12, Pid =0A> wrot= e:=0A> =0A> > From: Pid =0A> > Subject: Re: not able to ac= cess URL in 2nd app in=0A> 7.0.23=0A> > To: "Tomcat Users List" =0A> > Date: Wednesday, January 25, 2012, 12:55 AM=0A> > On 2= 5/01/2012 02:49, removeps-code@yahoo.com=0A> > wrote:=0A> > > In my webapps= folder there are two folders:=0A> ROOT,=0A> > myapp.=A0 ROOT is the defaul= t app.=0A> > > =0A> > > In myapp/WEB-INF/web.xml there is=0A> > > =0A> > >= =A0=A0=A0=0A> > >=A0=0A> >=0A> =A0=A0=A0MyServlet=0A> > >=A0=0A> >=0A> =A0=A0=A0package.MyServlet= =0A> > >=A0=0A> >=0A> =A0=A0=A01=0A> > >=A0=A0=A0=0A> > >=A0=A0=A0=0A> >= >=A0=0A> >=0A> =A0=A0=A0MyServlet=0A> > >=A0= =0A> >=0A> =A0=A0=A0/folder/action.do=0A> > >=A0= =A0=A0=0A> > > =0A> > > When I go to http://host/myapp/fo= lder/action.do in Tomcat 7.0.22 it=0A> > invokes myapp, MyServlet.=A0 Even = some versions of=0A> Tomcat=0A> > 6.x did this.=0A> > > =0A> > > But in Tom= cat 7.0.23 it generates 404 page not=0A> found.=0A> > > =0A> > > Any idea w= hat I can do?=0A> > =0A> > What do the log files report, during application= =0A> startup=0A> > and when you=0A> > try to access the page?=0A> =0A> Duri= ng startup I see=0A> =0A> INFO: Deploying web application directory=0A> /ho= me/myusername/jvm/apache-tomcat-7.0.23/domains/mydomain/myapp=0A> =0A> When= going to the page, no logs are generated.=A0=0A> However I put a System.ou= t.println statement in the default=0A> servlet of myapp to print the getReq= uestURI() and find that=0A> the following URI is hit "/myapp/404.html".=0A>= =0A> The myapp/WEB-INF/web.xml has=0A> =0A> =A0 =0A> =A0 =A0 <= error-code>404=0A> =A0 =A0 /404.html=0A> = =A0 =0A> =0A> So this means that the myapp servlet is invoked,= which is a=0A> good thing.=A0 But the URL I went to is https://mydomain/my= app/folder/action.do.=0A> =0A> The servlet that is supposed to handle /fold= er/action.do is=0A> not invoked.=0A> =0A> Nor should it be invoked.=A0 Ther= e is an https security=0A> constraint in myapp/WEB-INF/web.xml to direct th= e user to=0A> myapp/login.html.=A0 This page is generated by the=0A> defaul= t servlet as well.=0A> =0A> So I will try two things.=A0 First, remove the = https to=0A> see if it works.=A0 Second, change the url-mapping from=0A> an= exact match like "/myapps/folder/action.do" to=0A> "*.action.do"=0A> =0A>= > =0A> > p=0A> > =0A> > > I'm gonna check if it works in 7.0.25.=0A> =0A> = FYI, it does not work in 7.0.25 either.=0A> =0A> --------------------------= -------------------------------------------=0A> To unsubscribe, e-mail: use= rs-unsubscribe@tomcat.apache.org=0A> For additional commands, e-mail: users= -help@tomcat.apache.org=0A> =0A> --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org