Lava,

Please read the following:

http://tomcat.apache.org/tomcat-6.0-doc/appdev/deployment.html

Pay particular attention to:

http://tomcat.apache.org/tomcat-6.0-doc/appdev/deployment.html#Standard_Directory_Layout


(please note the above link is line-wrapped)

Here's an example. Each line level is a subdirectory. Comments are in 
parentheses.

Static (top folder - application name)
├── (jsp, html, js, css, etc. - can have subdirectories)
├── META-INF (context.xml, not required - see Tomcat documentation)
└── WEB-INF
    ├── classes (where the java classes you wrote go)
    ├── lib (where jar files - yours or third party libraries go)
    └── web.xml (deployment descriptor - read the standard)

A minimal Tomcat 6 deployment descriptor for an application containing only 
static resources could be:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun. 
com/xml/ns/javaee/web-app_2_5.xsd">
<display-name>Static Application</display-name>
<description>HTML, CSS, and JS application</description>
    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
    </welcome-file-list>
</web-app>

(note again that the third / fourth line of the web-app element is line-wrapped)

The index.html file would go under Static (Static->index.html).

The web.xml file would go under Static->WEB-INF (Static->WEB-INF->web.xml).

You would display this application by copying the entire directory structure to 
$CATALINA_HOME/webapps, starting Tomcat, and then browse to 
http://localhost:8080/Static/ (provided you have not changed the default 
server.xml.

If you want to make a war file, then go to the parent directory and issue the 
following command from the command line:

jar tf Static.war Static

Please note that case is important. This will create Static.war which can then 
be deployed using Tomcat's manager application (or copying Static.war to 
$CATALINA_HOME/webapps).

. . . . just my two cents.

/mde/


----- Original Message ----
From: Lava Saleem <lnsal...@ualr.edu>
To: Tomcat Users List <users@tomcat.apache.org>
Sent: Wed, December 8, 2010 12:12:18 PM
Subject: Re: HTTP status 404

Hi Chris
Thanks for the reply

>Didn't you ask this same question the day before yesterday? Have you
read all the replies and questions?

No this one is a different question & yes I have read the replies and went
through the documentation

>What does all that mean? Are those file paths? Are they descriptions of
how you have concatenated files together? It doesn't make any sense to me.

yes those are the folder path as you may see, I have  filename.htm with
web.xml with META-INF with classes with lib in a folder called WEB-INF  this
folder  is in a folder called filename, filename is in the webapp folder.

>What URL did you request? What resource did you expect it to serve?
yes I have the url and I can't think of any resources needed thats why Iam
asking the question


Thanks

Lava

On Wed, Dec 8, 2010 at 2:47 PM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Lava,
>
> Didn't you ask this same question the day before yesterday? Have you
> read all the replies and questions?
>
> On 12/8/2010 2:39 PM, Lava Saleem wrote:
> > 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
>
> What does all that mean? Are those file paths? Are they descriptions of
> how you have concatenated files together? It doesn't make any sense to me.
>
> > I did not modify the web.xml since I don't need the servlets do I need to
> > modify anything?
>
> Maybe.
>
> > HTTP status 404
> > description the requested resource (/filename/)is not available
>
> What URL did you request? What resource did you expect it to serve?
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkz/4L4ACgkQ9CaO5/Lv0PAScgCePUhYj8pYL/9Vb3eNZDHncVa3
> GAsAoLvpcJjFYd1vb6ufehd41FgB084q
> =SFt0
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


--





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to