I am using struts1.2 and junit 3. In order to test my action classes, I need to create HttpServletRequest objects.
Now Struts 1.2 has does not provide a way to create mock objects of HTTPServletRequest. However, Struts1.3 has MockHttpServletRequest.class, with which you can mock the HTTPServletRequest.
It's not an option to upgrade from Struts 1.2 to Struts 1.3 at the moment. So what I did was create a jar file out of the mock package in Struts 1.3 and added it to my project.
Eclipse content tool does see the MockHttpServletRequest class, ie if I type "Mockhtt" and press CTRL+space, eclipse completes the class name for me and adds the import statement as well.
But after I create the HTTPServletRequest object, eclipse gives an error saying
"The import org.apache.struts.mock cannot be resolved". 
What can I do to get around this error? I need to mock the HTTPServletRequest.