yeah, I am not sure how to fix that one, we would have to figure out a smart(hacky) way to make the servlet context resolve the paths, but that would probably only work for maven.
musachy On Thu, Sep 17, 2009 at 8:51 AM, phillips1021 <bphill...@ku.edu> wrote: > > Musachy: > > I'm using the code for the JUnit plugin (2.1.8) to do testing of Struts 2 > Actions. My project is using the Spring and convention plugins. The tests > execute successfully, but a FileNotFoundException is thrown. Here is the > relevant log data when running the test. > > 2009-09-17 10:44:13,377 WARN > org.springframework.mock.web.MockServletContext.getResourcePaths:212 - > Couldn't get resource paths for class path resource [WEB-INF/content/] > java.io.FileNotFoundException: class path resource [WEB-INF/content/] cannot > be resolved to URL because it does not exist > at > org.springframework.core.io.ClassPathResource.getURL(ClassPathResource.java:163) > at > org.springframework.core.io.ClassPathResource.getFile(ClassPathResource.java:175) > at > org.springframework.mock.web.MockServletContext.getResourcePaths(MockServletContext.java:196) > at > org.apache.struts2.convention.DefaultResultMapBuilder.createFromResources(DefaultResultMapBuilder.java:227) > at > org.apache.struts2.convention.DefaultResultMapBuilder.build(DefaultResultMapBuilder.java:183) > at > org.apache.struts2.convention.PackageBasedActionConfigBuilder.createActionConfig(PackageBasedActionConfigBuilder.java:680) > at > org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildConfiguration(PackageBasedActionConfigBuilder.java:479) > at > org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildActionConfigs(PackageBasedActionConfigBuilder.java:278) > at > org.apache.struts2.convention.ClasspathPackageProvider.loadPackages(ClasspathPackageProvider.java:52) > at > com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:200) > at > com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55) > at > org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:360) > at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:403) > at > org.apache.struts2.util.StrutsTestCaseHelper.initDispatcher(StrutsTestCaseHelper.java:54) > at > edu.ku.it.si.blackboarddemo.action.StrutsTestCase.initDispatcher(StrutsTestCase.java:207) > at > edu.ku.it.si.blackboarddemo.action.StrutsTestCase.setUp(StrutsTestCase.java:193) > > By default the convention plugin specifies that JSPs will be in > WEB-INF/content/. > > I can send you a complete maven project with the test that demonstrates this > issue. > > I'm using Spring plugin and convention plugin versions 2.1.6. > > Bruce > > Musachy Barroso wrote: >> >> JUnit plugin has been around as long as I can remember. What is new in >> 2.1.8 is the ability to execute actions inside Struts and outside a >> container. >> >> musachy >> >> On Sat, Sep 5, 2009 at 7:58 AM, phillips1021<bphill...@ku.edu> wrote: >>> >>> Since Musachy mentioned that the code wasn't yet released I wasn't sure >>> about >>> the protocol. >>> >>> I'll take your comment as yes its OK. >>> >>> Will the Struts 2 JUnit plugin jar be part of the 2.1.8 release? I'd >>> like >>> to include in my article if people can expect it in 2.1.8 and be able to >>> just add a dependency in the pom.xml or include the downloaded jar in >>> their >>> classpath. For now I understand they'll have to checkout the latest code >>> from subversion repository. >>> >>> >>> >>> newton.dave wrote: >>>> >>>> phillips1021 wrote: >>>>> is it OK if I write up a blog article with code example that shows >>>>> how to use the StrutsTestCase right now for writing unit tests? >>>> >>>> Why wouldn't it be? >>>> >>>> Dave >>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >>>> For additional commands, e-mail: user-h...@struts.apache.org >>>> >>>> >>>> >>> >>> -- >>> View this message in context: >>> http://www.nabble.com/how-do-you-test-your-action-classes--tp25289507p25309276.html >>> Sent from the Struts - User mailing list archive at Nabble.com. >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >>> For additional commands, e-mail: user-h...@struts.apache.org >>> >>> >> >> >> >> -- >> "Hey you! Would you help me to carry the stone?" Pink Floyd >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> >> >> > > -- > View this message in context: > http://www.nabble.com/how-do-you-test-your-action-classes--tp25289507p25491968.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > -- "Hey you! Would you help me to carry the stone?" Pink Floyd --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org