You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Manivannan.P" <ma...@yahoo.com> on 2006/03/20 16:48:40 UTC

RE: Re: What, exactly, is meant by "full path" when construction web.xml entries

Always resolve the URL yourself before letting the tomcat do it. For every sub application and context's path is equals to <root-context> +  sub application's context.
   
  
cknell@onebox.com wrote: 
  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
cknell@onebox.com - email



-----Original Message-----
From: David Smith 
Sent: Mon, 20 Mar 2006 10:28:29 -0500
To: Tomcat Users List 
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

cknell@onebox.com 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?
>
> 
> monkey
> com.kilonovember.Monkey
> 
>
> 
> monkey
> /monkey
> 
>
>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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org




--
  Manivannan.P
    http://geocities.com/manivannan57

   
   
   
   

		
---------------------------------
Yahoo! Mail
Bring photos to life! New PhotoMail  makes sharing a breeze.