Jasper Reports, generating temporary file --> test.java
I’m trying to incorporate Jasper Reports with my current project, and I’m having some trouble using Spring’s Web MVC.
Here’s what I’ve done so far:
First I created my “test.jrxml” file using iReports. Copied this file into my “webapp/WEB-INF/” directory. I’ve created a class called “JasperReportsController” which extends “JasperReportsMultiFormatView”. I’m using Eclipse with a Tomcat plugin (4.1.x). I’ve followed the example from springs documentation, section 13.7.3. It seems that whenever I run Tomcat Server, that the “test.java”, temp file, is generated immediately. For some strange reason “test.java” is generated inside the following directory “C:\webarch\eclipse\test.java”, as opposed to my projects location “C:\webarch\projects\%my_project_name%”. This is causing there to be classpath issues, because it can’t seem to see any of the jasper reports library classes. The following is a console snippet of the error:
C:\webarch\eclipse\test.java:4: package net.sf.jasperreports.engine does not exist
import net.sf.jasperreports.engine.*;
^
C:\webarch\eclipse\test.java:5: package net.sf.jasperreports.engine.fill does not exist
import net.sf.jasperreports.engine.fill.*;
^
C:\webarch\eclipse\test.java:14: package net.sf.jasperreports.engine does not exist
import net.sf.jasperreports.engine.*;
^
C:\webarch\eclipse\test.java:15: package net.sf.jasperreports.engine.data does not exist
import net.sf.jasperreports.engine.data.*;
^
C:\webarch\eclipse\test.java:21: cannot resolve symbol
symbol : class JRCalculator
location: class test
public class test extends JRCalculator
^
C:\webarch\eclipse\test.java:28: cannot resolve symbol
symbol : class JRFillParameter
location: class test
private JRFillParameter parameter_REPORT_RESOURCE_BUNDLE = null;
^
C:\webarch\eclipse\test.java:29: cannot resolve symbol
symbol : class JRFillParameter
location: class test
private JRFillParameter parameter_REPORT_CONNECTION = null;
^
………………………
………………………
………………………
Are there any suggestions on how I can make this temporary file get generated at least within the projects directory?