I want to inject object that has 12mb into my jetty webapp. I deploy my app as WAR file so I cannot add guice injector as it is shown in other question.
How to do it? I quess I need to use applicationContext.xml
I want to inject object that has 12mb into my jetty webapp. I deploy my app as WAR file so I cannot add guice injector as it is shown in other question.
How to do it? I quess I need to use applicationContext.xml
Use the ServletContext.setAttribute(String,Object)
to store your object.
Then use ServletContext.getAttribute(String)
to access that singleton from your Servlets and Filters.
Make sure your object is safe to use from multiple threads!