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

Plain Java support #218

Open
dominickleppich opened this issue Oct 1, 2024 · 3 comments
Open

Plain Java support #218

dominickleppich opened this issue Oct 1, 2024 · 3 comments

Comments

@dominickleppich
Copy link

Hi,

this project looks really promising for my needs and I would like to thank you for your work.

I am working on a JSF web application and would like to embed this log viewer into it. The documentation on this topic is not written yet and the source code seems to be tightly coupled to Spring code. Am I missing something or is there no support for plain Java web projects right now?

Thanks in advance :)

@sevdokimov
Copy link
Owner

You can use log viewer in a plain java application, you have to register com.logviewer.web.LogViewerServlet as a servlet and create a default spring context.
See https://github.com/sevdokimov/log-viewer/tree/master/demo/simple-java-web-application/ as a sample project.
There is MyLogViewerServlet.java class that extends com.logviewer.web.LogViewerServlet and creates a default spring context in init() method.

@dominickleppich
Copy link
Author

Hi, thanks for the answer. I already found this demo sample, but it seems to only work with a Spring context. The web application I'm working on is not a Spring application, but a JSF without Spring application.

Can this Spring context be used in a non-Spring application without any issues?

@sevdokimov
Copy link
Owner

yes, that spring context will be used by log-viewer only, other parts of the application may be non-spring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants