Still no success.

This is what I have:
$CATALINA_HOME/webapps/hi/WEB-INF/classes/hi.class

$CATALINA_HOME/webapps/hi/WEB-INF/web.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
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>Hello, World Application</display-name>
<description>
This is a simple web application with a source code organization
based on the recommendations of the Application Developer's Guide.
</description>


    <servlet>
        <servlet-name>HelloServlet</servlet-name>
        <servlet-class>hi</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>HelloServlet</servlet-name>
        <url-pattern>/h*</url-pattern>
    </servlet-mapping>

</web-app>

$CATALINA_HOME/webapps/hi/META-INF/context.xml
<context docBase="hi">
</context>

----
I've also tried it with the context.xml file renamed as hi.xml and placed in $CATALINA_HOME/conf/Catalina/localhost.


When I use http://localhost:8080/hi, I get a tomcat generated page with a blank directory for "/".

On Jan 17, 2005, at 6:35 PM, Parsons Technical Services wrote:


I didn't do any setting up, other than to install the compatibility
patch as directed.  It is my understanding that this acts as a bridge
between the "new" V5.5 tomcat architecture, and the old 1.4 JDK.  From
the success of the trial servlets, the installation seems to be
working, and I just suspect that I have failed to configure something
properly.


Ok. Just wanted to be sure as this has been the issue on several posts lately.

Now for your problem. There are two (or more) ways that you can deploy an application. One is by manual file and folder creation and the other is by WAR files. Either way there is a directory structure that needs to be followed.

From a recent post:

Quote"
Hi,

I think it would be good practice to require your developers to create
war file for you.

http://java.sun.com/blueprints/guidelines/ designing_enterprise_applications_2e/technologies/ technologies3.html#1043856

Anyway, there is some links that might be useful

http://java.sun.com/j2se/1.4.2/docs/tooldocs/tools.html#basic
look jar-tool, war file is same format that war file.

I think you should read also servlet spefication specks
http://jcp.org/aboutJava/communityprocess/final/jsr154/index.html

And maybe it would be worth of use tools like ant
http://ant.apache.org/

- Jukka -

" Unquote

This should get you the information on the structure you need to set up. From there you need to create a context.xml file that will solve your problem. In 5.5 you do not use the path field unless you put the context in the server.xml.

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html
gives you several locations to place the context files. If you are not using WAR files, then use the "appname".xml


per the above page place it in the $CATALINA_HOME/conf/[enginename]/[hostname]/ directory
The path is then taken from the name of the xml file.
OR
context.xml and place it in /META-INF/context.xml inside the application files and the path will be based on the docBase.


If you look there now you will find some files for the built in apps (I think) I do not run 5.5 but 5.0 and there are some changes as to what was included.

Unless you want it to be the default app, that's in last weeks archives.

Doug


--------------------------------------------------------------------- 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]



Reply via email to