Ok - a few basics. You want, for each application, the same basic
"skeleton" - I'll use my-app as a generic application name
$TOMCAT_HOME/webapps/my-app -- AKA - the "Root Directory" for this
application. This is where your HTML, JSP files go -- as well as any
other direcories you want.
my-app/WEB-INF -- this directory is not accessible to people on the web,
but contains important config data about your app.
my-app/WEB-INF/classes -- any compiled classes you have - servlets, etc
go here. Be sure you have your package structure reflected here. By
that, I mean:
package com.myapp;
would require the following directories to exist:
my-app/WEB-INF/classes/com/myapp
... and any classes you have defined in that package would go in that
directory (the .class files)
If you have any jar files (third-party jars -- or even jars you've
made), you'll also want:
my-app/WEB-INF/lib -- place your jar files here (recommend creating the
directory even if you have none - I heard someone having problems when
it wasn't there)
Most of your application-centered configuration options can be placed in
a file name web.xml (the application deployment descriptor) located
under my-app/WEB-INF. If you are not familiar with the format of this
file (it's structure is checked against a DTD, so it must match the spec
or ... you won't get the behavior you desire), there are many places you
can look. Personally, I have a copy of Java Servlet Programming I keep
handy - as well as Java Server Pages -- both of which are O'Reilly
books. They are quite good. I recommend them to you. You can find a
great deal of information on the format of the config files, as well as
a wealth of other information, by reading them.
For your current problem, I suggest you do the following:
In your web.xml file, place the following:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
Either consult the books I mentioned above for additional details, or
look on the web. The Tomcat site has some good starter information on
it. You might start there.
Good Luck,
Eddie
Serdar BOZDAG wrote:
>i think i don't. i am new at this tomcat staff could you give more precise
>information about this index file and by the way i have another question
>about opening a new port (85 for instance) for another application. what
>changes will i do in the configuration. (please give example)
>
>thanks
>serdar
>----- Original Message -----
>From: "Eddie Bush" <[EMAIL PROTECTED]>
>To: "Tomcat Users List" <[EMAIL PROTECTED]>
>Sent: Sunday, July 14, 2002 11:02 PM
>Subject: Re: deny to access the static context
>
>>Do you have an index (from your web.xml welcome-file-list) page in the
>>directory Meodies? It sounds like you do not. That would be required.
>> Not only do you need to have the index, but you also need to have it
>>specified in the welcome-file-list section of your web.xml.
>>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>