I'm working this API and there is a factory method that sets the current context (request, user, etc). The context needs a HttpServletRequest parameter, but I'm not for sure how to initialize it. I would like this setContext(HttpServletRequest) method to be in the default constructor of the class, how do I go about initializing it so that I can use it with setContext? Is the only way to work with HttpServletRequest objects in a servlet, so I can't use the a java class?
Here's the library I'm using: http://library.blackboard.com/ref/6760ba98-8f24-44f2-8e65-0dcee799abb8/index.html
HttpServletRequests outside of servlets. The problem is, where does the request come from? It doesn't really make sense to create your own, since anHttpServletRequestrepresents an HTTP request. What's the API that you're working with that needs this parameter? You're probably just not using correctly.