Cougaar and the servlet mapping

Todd Wright twright at bbn.com
Mon Nov 5 13:31:48 EST 2007


The ServletService supports extra path information.

For example, if you call:
   servletService.register("/test", myServlet);
then your servlet will receive requests for:
   /test
   /test/
   /test/abc
   /test/abc/xyz
   ...

The extra path information is available from:
   String extraPath = request.getPathInfo();  // e.g. "/abc"
The full path is available from:
   String fullPath = request.getRequestURI();  // e.g. "/$MyAgent/test/abc"

You shouldn't need to modify the Tomcat XML configuration files.

Todd

Guillaume Liegard wrote:
> Hello,
> 
> I want to use the tomcat container.
> 
> But I didn't find the equivalent of a classic servlet mapping.
> 
> For example, this servlet mapping map all "/repository/ [something]"  
> urls to the Webdav servlet.
>   <servlet-mapping>
>         <servlet-name>Webdav</servlet-name>
>         <url-pattern>/repository/*</url-pattern>
>   </servlet-mapping>
> 
> With cougaar, I manage to map One adress to a servlet, with the
>   servletService.register(path, servlet);
> But every requests with extra path like "/repository/ [something]" are 
> not received by the servlet.
> 
> Regards
> 
> -- 
> Guillaume Liégard
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Cougaar-developers mailing list
> Cougaar-developers at cougaar.org
> http://cougaar.org/mailman/listinfo/cougaar-developers



More information about the Cougaar-developers mailing list