Hello, I am trying to write unit tests for an action that uses xslt result type with struts 2.3.4.1 I am using a XSLT file located in WEB-INF to render the result (the location is something like: /WEB-INF/xslt/myfile.xsl). That works. But I cannot figure out how I can test the action. I would like to control the result (XML) of my action.
I usually use the class org.apache.struts2.StrutsSpringJUnit4TestCase with SpringJUnit4ClassRunner to test my actions but it does not seem to work for XSLT. It actually fails on the line 438 of org.apache.struts2.views.xslt.XSLTResult: URL resource = ServletActionContext.getServletContext().getResource(path); ServletActionContext.getServletContext() returns a spring MockServletContext which does not seem to be able to retrieve a resource relative to the context path. Has anyone succeeded in testing xslt result type in this kind of situation? Thanks :) --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org