Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 10702 invoked from network); 9 Dec 2010 18:05:00 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 9 Dec 2010 18:05:00 -0000 Received: (qmail 63675 invoked by uid 500); 9 Dec 2010 18:04:55 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 63618 invoked by uid 500); 9 Dec 2010 18:04:55 -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 63605 invoked by uid 99); 9 Dec 2010 18:04:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Dec 2010 18:04:55 +0000 X-ASF-Spam-Status: No, hits=-1.6 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: 128.253.83.141 is neither permitted nor denied by domain of david.smith@cornell.edu) Received: from [128.253.83.141] (HELO authusersmtp.mail.cornell.edu) (128.253.83.141) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Dec 2010 18:04:47 +0000 Received: from [127.0.0.1] (rrdhcp-6-269.redrover.cornell.edu [128.84.7.13]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id oB9I4Psm002863 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 9 Dec 2010 13:04:26 -0500 (EST) Message-ID: <4D011A27.4050801@cornell.edu> Date: Thu, 09 Dec 2010 13:04:23 -0500 From: David Smith Reply-To: david.smith@cornell.edu User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.12) Gecko/20101027 Lightning/1.0b2 Thunderbird/3.1.6 ThunderBrowse/3.3.4 MIME-Version: 1.0 To: Tomcat Users List Subject: Re: HTTP status 404 References: <4CFFFA26.1070509@ice-sa.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Looks like you should be requesting /filename/filename.htm instead of filename/ ... that is unless you've set a welcome file in the app's web.xml file. If that doesn't work, also take a look at the tomcat logs for the moment in time you a. started tomcat, b. deployed your app (if different from the time tomcat was started) and c. when you requested the file. --David On 12/9/2010 12:10 PM, Lava Saleem wrote: > Hello everyone, > Thanks for the replies I really appreciate your feedback > > I have the structure as the following > webapps > | > filename > |- filename.htm > * |-*WEB-INF > |- web.xml > |-META-INF > |-context.xml > > after having this structure,I use the following command > > CATALINA_BASE/webapps/filename/ jar -cvf filename.war *.* > > then I deploy the file in the tomcat manager and I have the following error > > HTTP status 404 > description the requested resource (/filename/)is not available > > I assumed that I don't need the java classes and lib in the WEB-INF since > I'm only having single html file with java script, Do you think I need any ? > if so how do I know which files I need ? > > I also extracted the filename.war just to see whats in there and I see only > the filename.htm and the META-INF there is no WEB-INF it is disappearing > > Thanks > Lava > > On Wed, Dec 8, 2010 at 4:35 PM, Andr� Warnier wrote: > >> Lava Saleem wrote: >> >>> Hi everyone, >>> I have a single page html file with java script embadded in it, I have >>> created a war file for it and deployed it successfully but when I click on >>> the page I get the below error, the structure of my war file is the >>> following >>> >>> webapp --> filename --> WEB-INF--> filename.htm + web.xml + META-INF >>> + classes + lib >>> >>> I did not modify the web.xml since I don't need the servlets do I need to >>> modify anything? >>> >>> HTTP status 404 >>> description the requested resource (/filename/)is not available >>> >>> >> Hi. >> Except the 404 error which your are getting, not much above makes any sense >> at all. >> >> So it is better to forget all that, and start new. >> You really have to learn to walk before you can run. >> >> First, consider the directory structure of a standard Tomcat installation : >> >> (CATALINA_HOME) >> (=CATALINA_BASE) >> | >> |- bin (tomcat "programs" and scripts) >> |- conf (configuration files) >> |- lib (global library files) >> |- logs (logfiles) >> |- webapps (* web applications *) >> |- ROOT (the special, top-level, default web application) >> |- app1 (a web application) >> |- app2 (another web application) >> |- ... >> |- lastapp (another web application) >> >> In the above, "(CATALINA_HOME)" represents the top directory of your Tomcat >> installation, the one under which the rest of Tomcat is found. >> For example, on your system it may be "C:\tomcat" or "C:\program >> files\Apache Software Foundation\tomcat6.0" or "/usr/share/tomcat6" or >> "/usr/local/tomcat6" or whatever. >> >> The "webapps" sub-directory is what is important for you now. That is >> where you will put "web applications", composed of static html pages (with >> or without javascript in them), JSP pages (special html pages with embedded >> Java code), java servlets (compiled java applications), etc.. >> >> The ROOT web application is special. It is the "default application". >> When you use a URL like : http://yourserver.yourcompany.com/abc.html >> Tomcat is going to look for "abc.html" under the webapps/ROOT directory. >> >> The other subdirectories under "webapps" are each one separate web >> application. >> To access for example the application named "app1", you will have to use a >> URL starting with "http://yourserver.yourcompany.com/app1/...." >> For example, if you place a html page named "xyz.html" in the subdirectory >> (CATALINA_HOME)/webapps/app1, then the URL to call it up will be >> http://yourserver.yourcompany.com/app1/xyz.html >> >> Under such a web application directory like ../webapps/app1, there is also >> a structure. >> It looks like this : >> >> (CATALINA_HOME) >> (=CATALINA_BASE) >> |- webapps (* dir, top of all web applications *) >> | >> |- app1 (dir, contains the web application named "app1") >> - public files (html etc..) >> - WEB-INF (directory) >> |- files (private) >> |- web.xml (configuration file for the application) >> |- classes (dir.) >> |- compiled java classes, like servlets >> |- lib (dir) >> |- java libraries for this webapp >> - META-INF (dir.) >> |- context.xml (more settings for the application) >> >> Basically everything under "app1" is optional. Tomcat will supply a >> default if needed. >> Of course, you will want at least one file under there, to make the execise >> meaningful. >> >> What is in the sub-directories WEB-INF and META-INF, can never be obtained >> directly by a browser. Tomcat will not allow it. >> So if you enter the following URL in the browser : >> http://yourserver.yourcompany.com/app1/WEB-INF/something >> Tomcat will respond with an error, even if "something" exists. >> >> >> But to start, I suggest that you just >> - stop tomcat >> - create a new sub-directory under ../webapps/, for example "myapp". >> - under that subdirectory, place a file called "myfile.html" >> - verify that the ownership and permissions of these files are such that >> the Tomcat user can read them >> - start Tomcat >> - in the browser, enter the URL : >> http://yourserver.yourcompany.com/myapp/myfile.html >> and enjoy. >> >> Now play around with the above : >> - create another page "mypage2.html", place it alongside "myfile.html", >> start Tomcat and call up the new page in the browser. >> - then stop Tomcat again, and create another subdirectory under "webapps", >> put something there, start Tomcat and call it up with the browser. >> - then stop Tomcat again, create a sub-directory "WEB-INF" under one of >> your webapps, put something in it, start Tomcat and try to call up that >> file. >> >> When you understand exactly how that works, then go read this page (again) >> : >> >> http://tomcat.apache.org/tomcat-6.0-doc/appdev/deployment.html >> >> And then you should come back for more questions about how to make .war >> files and deploy them properly. >> (tip : a .war file is just a zip file with the same content as the "app1" >> subdirectory above. It has to be named "app1.war", and you have to copy it >> under /webapps/ for Tomcat to understand what you want). >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >> For additional commands, e-mail: users-help@tomcat.apache.org >> >> --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org