> -----Original Message-----
> From: Andy Wickson [mailto:andy@;awtech.co.uk]
> Sent: Thursday, October 31, 2002 7:57 AM
> To: Tomcat Users List
> Subject: packages
> 
> 
> Hi all,
> 
> If I put a servlet called Hello.class into a package called 
> com.myco.test and have a suitable dir structure under 
> WEB-INF\classes to reflect this, do I still need to give the 
> full URL of the class in the web.xml file e.g.,
> 

yes

>     <servlet-name>Hello</servlet-name>
>     <servlet-class>com.myco.test.Hello</servlet-class>
> 
>     <servlet-mapping>
>     <servlet-name>Hello</servlet-name>
>      <url-pattern>com.myco.test.Hello</url-pattern>
>     </servlet-mapping>
> 
> Also when referencing this servlet from an html form do I 
> need to give the full URL?
> 

url-pattern is what you type into the browser to get to your servlet. You do
not want the package name here. Try a mapping of '/Hello' and you can access
it with http://myhost/Hello 

Charlie

> I've tried every combination I can think of.
> 
> Regards
> 
> Andy Wickson
> 

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>

Reply via email to