JasperReports through servlets
hi
i am trying to create jasper report through servlet. For tht i have used iReport for creating the gui of the report which gives jrxml file which is in turn used to create the report n export it to the desired format. i am exporting it to the PDF Format. My servlet is working fine when i use Tomcat & JBoss for deploying it. but when i run the same code with Sybase EAserver 4.0 the servlet is executed but the report is not exported in Pdf format instead it shows encrypted Text on the browsers window?
Here's the code:
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
con = DriverManager.getConnection("jdbc:microsoft:sqlserver://siddhant:1433;DatabaseName=ncstdb","cstuser","sengdake");
JasperDesign jd = JasperManager.loadXmlDesign(rs);
JasperReport jr = JasperManager.compileReport(jd);
JasperPrint jp = JasperFillManager.fillReport(jr,params, con);
OutputStream output =servletOutputStream;
JasperExportManager.exportReportToPdfStream(jp, output);
Can nebody please Help me Out.