quentinb Posted June 28, 2010 Share Posted June 28, 2010 Hi All.I need help using Jasper Reports with Struts2 annotations.I keep getting this error:Please Help!!Unable to load configuration. - [unknown location]Caused by: The Result type [jasper] which is defined in the Result annotation on the class [class za.co.credicor.crud.regions.action.RegionsReport] or determined by the file extension or is the default result type for the PackageConfig of the action, could not be found as a result-type defined for the Struts/XWork package [za.co.credicor.crud.regions.action#convention-default#] - [unknown location] Code:Inside My Class:@Results({ @Result(name="success", type="jasper", params={"location","/pages/jasper/our_compiled_template.jasper","format","PDF"}) }) try { JasperCompileManager.compileReportToFile( "/pages/jasper/our_jasper_template.jrxml", "/pages/jasper/our_compiled_template.jasper"); } catch (Exception e) { e.printStackTrace(); return ERROR; }Inside struts.xml <package name="default" extends="struts-default"> <result-types> <result-type name="jasper" class="org.apache.struts2.views.jasperreports.JasperReportsResult" /> </result-types> </package> Link to comment Share on other sites More sharing options...
quentinb Posted June 28, 2010 Author Share Posted June 28, 2010 Got it working. Thanks... Link to comment Share on other sites More sharing options...
skoropada Posted August 11, 2011 Share Posted August 11, 2011 Hi, I have the same problemHow do you resolve it ? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now