incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Janne Jalkanen <Janne.Jalka...@ecyrd.com>
Subject Re: ProfanityFilter + JSPWiki equivalent of ServletContext?
Date Mon, 14 Apr 2008 18:21:03 GMT
> 1.- check for the profanities list on ServletContext

I'd just simply use the Class.getResourceAsStream().  That would a)  
allow you to have multiple instances of the list with different  
words, and b) it would also work in the case where there is no  
ServletContext (e.g. when someone wants to embed JSPWiki rendering as  
a part of the application).

> Is there some "equivalent" class to ServletContext (like, i.e.  
> WikiSession
> and Session)? Right now, I was planning to grab it from WikiContext ->
> WikiEngine -> ServletContext, but just curious, I haven't found  
> one. Any
> other approach to achieve this functionality? Placing things on
> ServletContext.. urg; but in this case, where else?

You should probably model it according to the Denounce plugin (which  
reads a property file using the classloader).  That sounds like the  
easiest approach.

/Janne

Mime
View raw message