incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Jaquith <>
Subject Re: ProfanityFilter + JSPWiki equivalent of ServletContext?
Date Mon, 14 Apr 2008 18:25:02 GMT
Agreed. Class.getResourceAsStream() is the most portable way to do  
this. Note that you will want to modify the Ant script to make sure  
that any properties files are correctly added to JSPWiki.jar.

Question: is profanity something that ought to be localized?

On Apr 14, 2008, at 2:21 PM, Janne Jalkanen wrote:
>> 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

View raw message