I have a desktop application made in swing, and I need to create HttpServletRequest Object to pass it to another application through Web-Service, so please suggest me something good to create request object in simple class.
1 Answer
Spring has nice implementations of HttpServletRequest and HttpServletResponse called MockHttpServletRequest/Response. Javadoc link here. Although intended for testing, they work very well for cases where you need to pass internal servlet objects around.
The classes are in the org.springframework.test jar.
1 Comment
ropperman
BTW, I agree with Josh about dubious practices. OTOH, you don't always have control over the APIs you need to use.