Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 85311 invoked from network); 3 May 2007 16:04:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 May 2007 16:04:01 -0000 Received: (qmail 64633 invoked by uid 500); 3 May 2007 16:03:54 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 64615 invoked by uid 500); 3 May 2007 16:03:54 -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 64599 invoked by uid 99); 3 May 2007 16:03:53 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 May 2007 09:03:53 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of rashmi.sub@gmail.com designates 66.249.82.234 as permitted sender) Received: from [66.249.82.234] (HELO wx-out-0506.google.com) (66.249.82.234) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 May 2007 09:03:46 -0700 Received: by wx-out-0506.google.com with SMTP id i26so502749wxd for ; Thu, 03 May 2007 09:03:26 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=SvEmfu52nSllOL4naBOvlPW2C5QGadcZDew5AS9Qlf9US7JD/0ymb4rj45CEPSUnxh+kaP2ksXMqVAFMyaHmxEfs4V7Q3Fla0u+waUNxinpZhgFO1hXysmy+pkpH6Qz+Sf0Y89nEvBSmJ+ninHxfGRDJ8WBn/0c1XLjPToncDws= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=P05+o7sA7SAMvJrz9Mtpu9bnjO9LBYMnnzRVtBibEf1fbvqs6bRWsDlW2kxg9p8OytdnmWRHmGoABDCwhRG7n+MQgy8VoMZerkaHoXlXg9YOc3xgR8LOdlpFO/t2Ny62jM8MJmBqbGtDZNSeHb5GpALst35yXGsjdFfxeNFID7U= Received: by 10.90.97.11 with SMTP id u11mr1989536agb.1178208206180; Thu, 03 May 2007 09:03:26 -0700 (PDT) Received: by 10.90.36.5 with HTTP; Thu, 3 May 2007 09:03:26 -0700 (PDT) Message-ID: <3ef28230705030903p67dc8765jc72e569a90ae679c@mail.gmail.com> Date: Thu, 3 May 2007 12:03:26 -0400 From: "Rashmi Rubdi" To: "Tomcat Users List" Subject: Re: How to access application in the root? In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Virus-Checked: Checked by ClamAV on apache.org Hi Ashok, On 5/3/07, Ashok Sahu wrote: > Hi All, > I am migrating my J2EE application from JRun to Tomcat 5.0.28. I > deployed successfully the 'myAppname.war' file in Tomcat. Now here is my > problem: > > In the JRun, we were calling the jsp or servlet without giving the > application name in the URL. Same thing I need to do in the tomcat otherwise > it will requires lots of code changes. In the code it is written like for > example: > > > > > background="/images/modulebgimage_smaller.gif"> > > > Hence I want to access the application by using > > http://localhost:8080/servletname instead of Here it helps to know some of the basics of Tomcat. You're looking to deploy the application at the root Context, and the root Context is the first slash after the URL , for example http://localhost:8080/ <<< thats the root Context. > http://localhost:8080/myAppname/servletname In the above case , myAppname is the Context. The default behavior I've seen is that when one places a someApp.war under the webapps folder someApp automatically becomes the context. > I am not much familiar with tomcat. Please let me know how to achieve it. There are different configurations possible, the list of configurations I'm writing here is just to give a hint and may not be complete and may be partially correct but it gives the desired behavior. 1) One configuration is back up the default ROOT folder that ships with Tomcat and then rename myAppname.war to ROOT.war , then you can access the app at http://localhost:8080/ --- the root Context. 2) Another configuration is: In development environment , remove the myAppname.war and delete the myAppname folder from the webapps folder --- assuming you backed this up somewhere. Also delete ROOT.war and ROOT folder under webapps folder. Then simply create a ROOT.xml (Context file) under Tomcat's /conf/Catalina/localhost/ folder , define the With the above configuration also you can access your application at http://localhost:8080/ 3) Other configurations are also possible, but the above are what I know as of now. > > Thanks in advance > Ashok > -Regards Rashmi --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org