Bill Parkinson wrote:
> Greetings All,
>
> I would like to pose another related question on servlet alias mappings
> and paths.
>
> How should I map servlet such that it is invoked only for files ending
> .html in certain folder (and subfolders).
>
> For example /foofolder/bar.html invokes the servlet but
> /foofolder/bar.gif is handled by the default file servlet. (I don't
> want to deal with any multimedia objects but I do want to modify
> outgoing html.)
>
> It seems that mappings want to be either folder rules or file ending
> rules but not a combination???
>
In my work on the next version of Apache JServ, which will be 2.1-API
compliant, I've set things up so that extension mappings are local to a
servlet context, instead of global to the entire server. Among other things,
that means different people can use different JSP implementations (for
example), as long as they operate in different servlet contexts. I also have
the concept of the default servlet -- usually the file serving servlet -- but
again, local to the context.
To deal with your requirement, then, I would set up a servlet context that
mapped to "/foofolder", and defined the ".html" mapping only within that
context. The request for "/foofolder/bar.gif" would then get handled by the
default servlet, exactly as you described.
>
> Thanks,
> Bill Parkinson [EMAIL PROTECTED]
>
Craig McClanahan
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html