Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems setting up Audit4j in Servlet Spec 3.x #14

Closed
theborakompanioni opened this issue Aug 14, 2015 · 1 comment
Closed

Problems setting up Audit4j in Servlet Spec 3.x #14

theborakompanioni opened this issue Aug 14, 2015 · 1 comment
Assignees

Comments

@theborakompanioni
Copy link

Setting up Audit4j (v2.3.1) in a Servlet Sepc 3.x can be quite tricky.
Now I see that you have "removed support" for it.. de72070.
Can we have insight into the motivation behind this move?

Also: If no "handlers" are found the AuditManager is started with a path taken from context.getRealPath("/WEB-INF/classes") and afterwards checked if it is a file with AuditUtil.isFileExists(configFilePath) which always leads to an InitializationException.

Currently, I am working around this by setting init parameters in my initializer like this:

        servletContext.setInitParameter("handlers", "org.audit4j.core.handler.ConsoleAuditHandler");
        servletContext.setInitParameter("layout", "org.audit4j.core.layout.SimpleLayout");
        servletContext.setInitParameter("metaData", "org.audit4j.core.DummyMetaData");

This is not the way I had anticipated my config to look like. Can you guide the way to a proper solution?

@janithb
Copy link
Contributor

janithb commented Aug 14, 2015

Hi @theborakompanioni

We have recently moved Servlet Sepc 3.x config support to audit4j-http-app plugin. I will push the sources later.

There was a conflict between servlet spec 3 config support and other injecting configurations (Spring, cdi, etc).

We have already identified that scanning /WEB-INF/classes and getting initialization exception path in Servlet spec 3 is a bug. It will be fixed in 2.4.x release.

You can still want to use the servlet spec 2 config support please use http-app plugin.

please use audit4j 2.4.0-alpha1 for testing.

@janithb janithb closed this as completed Oct 25, 2015
janithb added a commit that referenced this issue Jan 15, 2018
[FIX] fix issue with audit-db integration issue #14 of audit-db
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants