Felix Meschberger wrote: > > The problem is that the script resource collector does not know and does > not care about ScriptEngines. It just collects resources and weighs them > according to their name and thus "match" for handling the request. > > Only later will the resources be adapted to Servlet.class, which then > checks the file name to see whether a ScriptEngine is registered for > that extension. > > So, the resource collector has now knowledge here and handling .java > scripts specially at this place is an absolute no-go (IMHO). > Yes, I agree - that's why I wouldn't change the current mechanism just for java :)
But what about delegating the resolution to the script engine? The script engine could do some weired resolution and return a set of resources that fit to this script engine. Now we could make this optional, so only if the script engine implements some marker interface the resolution is delegated to the engine. If not, the current default mechanism is used. This would keep our resolution clean but allow strange cases if required. Carsten -- Carsten Ziegeler [email protected]
