tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Smith <dan.sm...@globalone.net>
Subject Re: how to create war file
Date Mon, 27 Nov 2000 18:36:39 GMT
Use the jar command (i.e. jar cvf myapp.war classes...).  The classes
should be located in a directory structure as follows:

    myapp
        |
        |-- HTML/JSP files
        |
        |--WEB-INF
                    |
                    |--web.xml
                    |
                    |--classes
                    |        |
                    |        |--all classes (or packages)
                    |
                    |--lib
                            |
                            |-- all 3rd party jars and zips (i.e. JDBC
drivers, XML Parsers...)

NOTE:  If you have your classes (i.e. beans) located under a package
(i.e. com.mycompany.mybeans), then the package structure needs to be
preserved under the 'WEB-INF/classes' directory.  In other words,
com.mycompany.mybeans.Bean1.class would be found under
WEB-INF/classes/com/mycompany/mybeans/Bean1.class.

Once you have your war file, we will call it 'myapp.war', you place it
under the Tomcat 'webapps' directory.  When you restart tomcat, it will
expand myapp.war into the directory 'myapp', adding the path
'myapp/WEB-INF/classes' to the classpath along with all jar and zip
files under 'myapp/WEB-INF/lib'.

For a complete discussion in WebApps, see the link under Apache at
http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/appdev/index.html

Hope this helps,
Dan



--
"Sometimes I wish I could be you, just so I could be friends with me."
                -- Agelica Pickles



Mime
View raw message