Thanks. Yes, of course on the matter of the package name. I think I've grasped
the points I was struggling with. I have saved the spec to my local disk, and
when I'm comfortable enough with the general concepts, I'll be able to read it
and understand it.
--
Charles Knell
[EMAIL PROTECTED] - email
-----Original Message-----
From: David Smith <[EMAIL PROTECTED]>
Sent: Mon, 20 Mar 2006 10:28:29 -0500
To: Tomcat Users List <users@tomcat.apache.org>
Subject: Re: What, exactly, is meant by "full path" when construction
web.xml entries
More like:
package com.kilonovember ;
// imports here
public class Monkey extends HttpServlet{
// methods and programming
}
Note I didn't include the class name in the package name. This creates
a class with the full name of com.kilonovember.Monkey.
--David
[EMAIL PROTECTED] wrote:
Thanks for the sanity check. That did what I expected, so to expand on this, if I were
creating a "real" servlet whose source code opened like this:
package com.kilonovember.Monkey;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
public class Monkey extends HttpServlet{
.. programming stuff goes here ...
}
I would create this directory structure under "C:\Apache Software Foundation\Tomcat
5.5\webapps"?
com/kilonovember
and place my compiled Monkey.class in kilonovember?
Next I would edit the web.xml file and add these elements?
<servlet>
<servlet-name>monkey</servlet-name>
<servlet-class>com.kilonovember.Monkey</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>monkey</servlet-name>
<url-pattern>/monkey</url-pattern>
</servlet-mapping>
Having done that, I would re-start Tomcat and, providing my Monkey.class compiled
correctly, I should expect to be able to type "http://localhost:8080/monkey"
into my browser's address window and see the output of Monkey.class. Is that correct?
Thanks to everyone who responded.
---------------------------------------------------------------------
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]