I'm trying to write a Servlet which adds a Mapping on an existing Servlet-Class to ists own Context.
Is this possible or are there any restrictions ?

I tried this, but there wasn't a result:
.....
public class Index extends HttpServlet implements ContainerServlet {
............
protected void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
       PrintWriter out = response.getWriter();
Context child = (Context) host.findChild("/Admin"); //<-- ists not the default admin-app
       out.println(child.getName()+"<br />");       //<-- Exists
child.addServletMapping("/test.html", "Index"); //<--tries to map his own servlet class to a new url
   }
.......
}


If i go to http://myserver:8080/Admin/index.html there is no error or something,
but if i try http://myserver:8080/Admin/test.html i get a 404.
I use Tomcat 6.0.13 on WinXP or Debian4.0 if that counts.

If someone knows a good tutorial about this stuff, it would be very nice, because i can't find any on the web.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to