Hi kuno.

> How I must call the ProductServlet? I tried to put it in the classes
> directory, but it doesn't work!

You register servlets with your app in the WEB-INF/web.xml file. See e.g.
below.

<servlet>
  <servlet-name>snoopy</servlet-name>
  <servlet-class>SnooperDooperServlet</servlet-class>
  <init-param>
   <param-name>initparam1</param-name>
   <param-value>Hello</param-value>
  </init-param>
  <init-param>
   <param-name>initparam2</param-name>
   <param-value>World</param-value>
  </init-param>
 </servlet>

You would invoke snoopy like this:
1) http://<hostname + port?>/<app name>/servlet/<servlet-name> |
<servlet-class>
2) Internally: /<app name>/servlet/<servlet-name> | <servlet-class>

You can get away with not registering a Servlet in this manner, in which
case only the <servlet-class> will work as a way of invoking it. This is not
a good idea though..... for lots of reasons.

--
Miles Daffin
Java Developer, Netherlands.

Land: +31 (0)10 476 2412
Mobile: +31 (0)6 2959 1423
Permanent email: [EMAIL PROTECTED]


Reply via email to