java - How to get ServletContext object in the data layer? -


my application runs 2 separate parts, web module runs in tomcat container , data layer runs separate java program in different service , interact using database.

i want access servletcontext in data layer, how can this?

when use servletcontext in data layer gives me exception noclassdeffounderror.

so took @kayaman's advice. , tried limit use of objects in respective layers i.e. using context in presentation layer , hibernate session in data access layer.

i passed call controller dao , store needed objects in global map in dao later called further processiong. , returned signals presentation layer.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -