Hi!
Adding a context.xml is a nice thing and every good web-application should have one, but it is not required if you just want to have a simple working web-application - you even do not need a web.xml!. All you need is a WEB-INF directory inside your context-directory. As soon as tomcat's auto-deploy-mechanism detects a WEB-INF directory, the manager-application displays the web-app ("available"-flag is "true").
Best regards, Tex
sven morales schrieb:
Hi, There is missing a step on Mario's response. You have to add a <Context> at $CATALINA_HOME/conf/server.xml or a separate context file ending in .xml to be located at $CATALINA_HOME/conf/[enginename]/[hostname]/ directory. See this link: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html
aka_sergio
--- Mario Winterer <[EMAIL PROTECTED]> wrote:
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"Hi!
If you are already familiar with programming JSPs
and you just want to know what you must do to set up a web-application
that can handle JSPs - you're glad, because that is almost done.
Have a look at the tomcat-docu at http://localhost/tomcat-docs/appdev/index.html
In short:
1) create a directory below %TOMCAT_HOME%/webapps
The directory you've created is the root-directory
of your web-application's context.
(For the next steps, I assume the name of the
directory is "test".)
2) create a directory "WEB-INF" below
%TOMCAT_HOME%/webapps/test
This is the directory that contains all the settings
of your web-application.
That's it! Now you can put your jsp-files inside
your web-application's context directory (%TOMCAT_HOME%/webapps/test) or
any subdirectories except "WEB-INF". (This is the only directory, that
is never accessible from outside).
You do not need to restart Tomcat if auto-deploy is
enabled (which is the default setting).
You can access your files using a web browser via
the url "http://<host>:<port>/test"
(if you are sitting in front of the computer, tomcat
is installed on and you use default installation without overriding the
port: http://localhost:8080/test)
3) [optional] If your JSPs need any classes or
libraries that are not part of the JDK or Tomcat/commons (e.g. self-written
classes etc.), do the following:
+ put classes inside WEB-INF/classes/<package name>
+ put libraries (.jar-files) inside WEB-INF/lib
The WEB-INF/classes directory and every jar-file
inside WEB-INF/lib will be in the scope of your web application's
classloader.
4) [optional] If you want to have more control over
your web-application, write a deployment descriptor:
Create a file "web.xml" in
%TOMCAT_HOME%/webapps/test/WEB-INF. (your deployment descriptor)
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
---------------------------------------------------------------------xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
<display-name>Test application</display-name> <description>Test application</description>
<!-- Further settings go here --> </web-app>
Best regards, Tex
P.M schrieb:
forHi,
I'm new to tomcat server for JSP and i'm reading
now a very huge book for knowing how to configuretutorial
tomcat 5.x to make WEB JSP application works
correctly.
I would like to know if someone knows a good
about tomcat because till now i just read 10 % ofbook
in 2 days...and i would like to perform a littleJSP
Yahoo!test before 3 weeks (end of reading book)
thx, Maileen
__________________________________ Do you Yahoo!? All your favorites on one personal page Try My
http://my.yahoo.com---------------------------------------------------------------------
To unsubscribe, e-mail:[EMAIL PROTECTED]
For additional commands, e-mail:[EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
__________________________________ Do you Yahoo!? Yahoo! Mail - You care about security. So do we. http://promotions.yahoo.com/new_mail
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]