• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts2 Convention plugin with junit plugin

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm using Struts 2.8.1 using the convention plugin and attemption to junit test this by utilizing StrutsSpringTestCase. The problem I'm experiencing is that the test throws an exception saying "No result defined for action com.becky.action.HowdyFolksAction and result success" if I don't use a Results annotation for "success" instead of just letting it find the correct jsp (which seems to sort of at least partially defeat the purpose).

Here's the test


and here's the action



Am I missing something or is it just that these plugins don't completely play well together?

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you ever get the Strut2 Convention Plugin and the Struts2 jUnit Plugin to work together? I keep getting the following error:

2011-10-14 14:15:42,380 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

The test works fine if i use an xml file for my action mappings, so i can only think that it is the annotations of the Convention Plugin (@Action and @Result) that are causing it to fail?

thanks
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic