posted 13 years ago
The HttpServletRequest has a much shorter scope than HttpSession, so even if you could get a request object from the session, how would you know if it is the one you needed unless your application or the specification implemented some mechanism to persist requst objects; which presents a whole nuther set of issues.
If you have the session id, then somewhere along the line you must have had access to th HttpServletRequest, so why not just pass it (or some other transport object) to your method and get the session id from the object from within your method? Either that or implement a method which can return what you need from the request and call if from your first method;