Jump to content
We've recently updated our Privacy Statement, available here ×

Help With Jasper and Saved pdf in the server?


2005 IR Help

Recommended Posts

By: sepi - sepideh

Help With Jasper and Saved pdf in the server?

2004-07-12 07:35

I have the project which contain a java class to create a pdf file and save it in the server and later we can use that pdf.

I have all jar file that I had in my local in the server:

jasper_compiler,jasper-runtime,jasper report applet and jasper report,bsh,and 4 itext jar file.

it's sitting in the server like home/tomcat/xyz.com/webapps/inv/web-inf/lib/

also I have a jsp file that call that java class.

so when I call the jsp in my browser,it calls the java and it creates a pdf in the server.

now I want to open the pdf which is created and saved in the server,I copy pdf to my local with frp and double click to open it but i get the acrobat message as follows:

"Acrobat could not open the abc.pdf because it's either not a supported file type or

because the file has been corrupted."

 

my java class:

Map parameters = new HashMap();

int customerNo = Integer.valueOf(CustomerNo).intValue();

parameters.put("CustomerNo",new Integer(customerNo));

DBConnectionManager dm = DBConnectionManager.getInstance();

 

String filename= "/home/tomcat/xyz.com/webapps/inv/inv"+customerNo+".pdf";

JasperManager.fillReportToFile("/home/tomcat/xyz.com/webapps/inv/jreport4.jasper",filename, parameters, dm.getConnection("abc"));

 

 

Any help?

Thanks,

 

 

 

 

 

 

By: sepi - sepideh

RE: Help With Jasper and Saved pdf in the server?

2004-07-13 05:53

Please Help????

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...