Does Oracle provide a connector to an authN/authZ framework such as Acegi/Spring Security?
That's how we (Atlassian) tackled the problem of customers needing to write their own filter every time... massively reduces the complexity required to get a new app up and running.