Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JSP-Servlet Unable to call .jrxml file from jsp

Have Programming Question? Ask it here!
 
 
 


Ganesh D Ganbote
Unable to call .jrxml file from jsp
0 Answer(s)      3 years and 7 months ago
Posted in : JSP-Servlet


Hi, I am doing web application in jsp. To create report I have used ireport and interated with neatbeans using plugin. After creating report in netbean when i call that jrxml file then it unable to access it.Error also not showing. I will show my code and its output. Please refer to it and suggest what changes need to be done. The is as Follows: **In Report.jsp file*****

<%@page import="net.sf.jasperreports.engine.util.JRLoader"%> <%@page import="net.sf.jasperreports.view.JasperViewer"%> <%@page contentType="text/html" pageEncoding="UTF-8"%> <%@page import="database.database_connection" %> <%@page import= "java.io.IOException;"%> <%@page import ="java.io.PrintWriter;"%> <%@page import ="java.io.StringWriter;"%> <%@page import= "java.util.HashMap;"%> <%@page import=" java.util.Map;"%> <%@page import=" java.sql.*;"%> <%@page import="database.CollectionDataSource"%> <%@page import=" javax.servlet.ServletException;"%> <%@page import=" javax.servlet.ServletOutputStream;"%> <%@page import=" javax.servlet.http.HttpServlet;"%> <%@page import=" javax.servlet.http.HttpServletRequest;"%> <%@page import=" javax.servlet.http.HttpServletResponse;"%> <%@page import=" net.sf.jasperreports.engine.*;"%> <%@page import=" net.sf.jasperreports.engine.design.JasperDesign;"%> <%@page import=" net.sf.jasperreports.engine.xml.JRXmlLoader;"%> <%@page import=" net.sf.jasperreports.engine.export.*;"%> <%@page import="database.database_connection" %>

<%@ page import="java.util.*" %> <%@ page import="java.sql.*" %> <%@ page import="java.io.*" %> <%@ page import="java.text.*" %> JSP Page

          <%
          ResultSet rsOfIncident = null;
       try {
                database_connection db1=new database_connection();
                if(db1.ConnectionStatus())
                 {

                      rsOfIncident =db1.getExecute("Select * from Incident");

                    }
                   db1.Close();
                 }
                catch(Exception e1)
                {
                }
    %>

             <%

Connection conn = null; JasperReport jasperReport; JasperPrint jasperPrint; JasperDesign jasperDesign; try { String connectionURL = "jdbc:mysql://localhost:3306/ticketingtool"; Class.forName("com.mysql.jdbc.Driver"); conn = DriverManager.getConnection(connectionURL,"root",""); JRDataSource dataSource = new JRResultSetDataSource(rsOfIncident);

// create a map of parameters to pass to the report. Map parameters = new HashMap(); parameters.put("IncidentID", "FirstName"); jasperDesign = JRXmlLoader.load("E:/GRS/6th BacUp/ticketingtool/web/report2.jrxml"); jasperReport = JasperCompileManager.compileReport(jasperDesign);

// fill JasperPrint using fillReport() method jasperPrint = JasperFillManager.fillReport(jasperReport,parameters,dataSource);

JasperExportManager.exportReportToPdfFile(jasperPrint,"C:/demo.pdf"); response.setContentType("report2.jrxml"); JasperViewer.viewReport(jasperPrint); } catch(SQLException sqle) { System.err.println(sqle.getMessage()); } catch (ClassNotFoundException e) { System.err.println("No such class found!"); } catch (JRException e) { // display stack trace in the browser StringWriter stringWriter = new StringWriter(); PrintWriter printWriter = new PrintWriter(stringWriter); e.printStackTrace(printWriter); response.setContentType("text/plain"); } finally { //close the connection. if(conn != null) { try { conn.close(); } catch (Exception ignored) {} } } %>

             <table>
                 <tr>
                     <td>
                         Hello
                     </td>
                 </tr>
             </table>
   </form>
</body>

***And it output**** Here output display in browser.

JSP Page

             <table>
                 <tr>
                     <td>
                         Helo
                     </td>
                 </tr>
             </table>
   </form>
</body>


Advertisement
View Answers

Related Tutorials/Questions & Answers:
Unable to call .jrxml file from jsp
Unable to call .jrxml file from jsp  Hi, I am doing web application in jsp. To create report I have used ireport and interated with neatbeans using plugin. After creating report in netbean when i call that jrxml file
To call jrxml/jasper file through jsp code in netbean
To call jrxml/jasper file through jsp code in netbean  I am making... my question is I want to call that jasper file through my jsp code and i also... suggest me some code to call jasper file and to send dynamic querry
Advertisements
How to Display jrxml file on JSP page???
How to Display jrxml file on JSP page???  I made jrxml file using jasper report but how to display on jsp page?? i tried lot but still i didnt find out solution.so pls help me as soon as possible
jrxml in Jsp prntviewer
jrxml in Jsp prntviewer  Hi this is Mohan, I'm new to ireport. I have a requirement. I want to view jrxml in jsp. I was searching in google for few days but could not find the correct solution. My actual problem is that i dont
how to call jsp from flex
how to call jsp from flex  hi, i want to know that how can i call a FLEX from JSP. . A good Example will be appreciated
how to call jsp from flex
how to call jsp from flex  Plz help me out to get JSP from FLEX.... I need your help.... Thanks for future
unable to compile class file - JSP-Servlet
unable to compile class file  I wrote database connection in jsp file... * from Combolist"); List ulist = new ArrayList(); List clist = new ArrayList...("/jsp/Combobox.jsp"); dispatcher.forward(request, response
call dll from java - JSP-Servlet
call dll from java  Hello all how to call dll file methods in java
How to call jasper from jsp or servlet - JSP-Servlet
How to call jasper from jsp or servlet  Hi Expert , I created jasper report using ireport.how to call that jasper with jsp file or servlet file ? Thanks in advance Eswaramoorthy.s
Unable to bind to a hashmap from jsp using spring tags - Spring
Unable to bind to a hashmap from jsp using spring tags  Hi, I am unable to bind a hashmap from my jsp page. Here is what i want to do: I have an arraylist in a jsp page. As i loop through the array list, for each element i
Call servlet from javascript - JSP-Servlet
Call servlet from javascript  Hi in my application i have jsp... , in my jsp i have provided an upload button thet upload single column excel file... form in jsp file is Upload plot nos (.xls format
Call dll from java - JSP-Servlet
Call dll from java  Any one tell me how to call dll from java. Basically , i want read the cash m/c parameters(4,i.e i want to read the cash count) in java .For this i want to call a dll from java . Also any one have
how to call an exe file from java - Java Beginners
how to call an exe file from java  hi, how to call exe file with some parameters from java and save the output of the exe file in a specified path. Please let me know immediately..its urgent!!! Thanks in advance
Diff ways to call a EJB from Servlet, JSP - Java Interview Questions
Diff ways to call a EJB from Servlet, JSP  How can I call EJB from Servlet or JSP
Unable to execute JSP page
Unable to execute JSP page  I have written one jsp file. It contains html tags and jsp directives. I have saved the file with the extension .jsp. The tomcat server is already running onto my machine. I have saved the jsp file
Unable to compile class for JSP - WebSevices
Unable to compile class for JSP  org.apache.jasper.JasperException: Unable to compile class for JSP When I am trying to access a java file kept under src folder under a package from a jsp page placed under web directory, I am
how call ireports in jsp
ireports in servlet-jsp program i am trying to call the ireports in servlet and jsp...: java.lang.UnsupportedClassVersionError: Bad version number in .class file (unable...: java.lang.UnsupportedClassVersionError: Bad version number in .class file (unable
unable to connect to server - JSP-Servlet
, create a web application folder inside the webapps folder and put the jsp file...unable to connect to server  thank you for the program code for inserting and reteriving the image but i am unable to deploy these two programs
call ireports
call ireports  how to call jrxml file in jsp or servlets pls give one example any one? please send one example any one
error got minus one from read call - JSP-Servlet
minus one from a read call oracle.jdbc.dbaccess.DBError.throwSqlException...error got minus one from read call  hiiii while connecting my servlet...) the code is as follows: // *DataBase Connectivity from the Servlet. import
Unable to connect servet, jsp to oracle 10g database.. Unable to retrieve data..
Unable to connect servet, jsp to oracle 10g database.. Unable to retrieve data..  I have a class file AbstractDataAccessObject with the below code... max("+pkid+") from "+tableName); if(rs.next
How to call servlet in JSP?
How to call servlet in JSP?  How to call servlet in JSP
unable to get datas from oracle database
unable to get datas from oracle database  Dear Sir, I am again... this error when i run the jsp file in tomcat, I post my code below.. kindly let me... org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred
call from java - JavaMail
call from java  Hi, how i will call servlet from java.. plz its... the java.net package to call a servlet from the java code...(); } } -------------------------------------------   Servlet and JSP Examples
tomcat jsp call DLL
tomcat jsp call DLL  Where can i find Example of use JSP under Tomcat environment call DLL
a trigger to call .bat file oracle
a trigger to call .bat file oracle   hey,pls help mei want to know that can we call java/.bat file from plsql/proceudre /trigger   ... java/.bat file from plsql/proceudre /trigger mdakbark@gmail.com
callig jsp file from javascript function - JSP-Servlet
callig jsp file from javascript function  I want to call a jsp file... data, no button and no links. Is it possible to call jsp page from static html... to call either jsp pge or html page from one html form. even u dont need to open
reading dropdown values from properties file in jsp
reading dropdown values from properties file in jsp  reading dropdown values from properties file in jsp
Unable to run jsp files on internet explorer - JSP-Servlet
Unable to run jsp files on internet explorer  Hi, I am Akhilesh... checked alwz open jsp files with internet explorer from tht point onwards whnever i open a jsp file nothing gets loaded in the internet explorer and internet
how to call from pc to telephone in java - MobileApplications
how to call from pc to telephone in java  Hi, presently I am working on "make a call from pc to telephone" in java. I am unable to procceed how to start. I am new this technoloy.Please give me some valuable suggestions how
Unable to run the jsp page - JSP-Servlet
Unable to run the jsp page  Expert:Naga Hi, I need solution this program. In cart.jsp I printed the total amount of the products then the next... with the date because when the admin want to display the details from particular date
iPhone Make Call from App
iPhone Make Call from App  iPhone Make Call Programmatically I have created an application in iPhone that has the functionality to make Call from App. I am just wondering how to make a call programmatically... is there any
How to write .properties file from jsp
to implement/write .properties file from jsp. Regards, Venkatesh Gurram...How to write .properties file from jsp  Hi i new to java i stuck here... it in my jsp but Iam unble to modify/write the .properties file and Iam not getting
Unable to get data from class - Development process
Unable to get data from class  I get this code from the internet which read from comm port of the computer & modify is as below:- package COM... the getWeight() function from this ComControl class when i click the Jbutton2
database call from javaScript - Ajax
database call from javaScript  Dear All, In my project i have one... name. and i have to do this in javascript.How do i call database query ,if suppose i have selected two building from text area,i have to finish
How to read and display data from a .properties file from a jsp page
How to read and display data from a .properties file from a jsp page  I have a .properties file. I have to create a jsp page such that it reads the data from this .properties file and display it in table format. Ex:by using
Call an array from multiple functions
Call an array from multiple functions  I am having two methods in this method i am getting array values from another class. i create same array name for accessing the method values(array) but it will access only one method values
Read Text file from Javascript - JSP-Servlet
Read Text file from Javascript  plz send the code How to Retrieve the data from .txt file thru Javascript? And how to find the perticular words in that file
Struts2...problem in JSP..unable to get the values for menuTitle!!!
Struts2...problem in JSP..unable to get the values for menuTitle!!!  **Hello everyone... i'm trying to make a dynamic menu from database in struts2... Jsp is displaying the menuId from database but not the menuTitle...where as its
write to file from servlet - JSP-Servlet
write to file from servlet  Hi, I have a jsp file where I input... right data on the web site. I am also trying to write this data to file... JSP Page //<
how to generate the pdf file with scroolbar from jsp age - JSP-Servlet
how to generate the pdf file with scroolbar from jsp age  How to generate the pdf file with scroolbar from jsp.i am not able to see the all the columns in pdf file now .it is very urgent for me plz help
how to display data from jsp file into database
how to display data from jsp file into database  this is a jsp file . look at the line with code-> Statement st=con.createStatement(); in the below example. the error is "cannot convert from java.sql.Statement
retrieving of value from excel file - JSP-Servlet
this message to all the employees when i upload a file then it fetch a data from that excel sheet i.e this matter will take a para meter values from the excel...retrieving of value from excel file  Dear sir, Thanks for sending
retrieving of value from excel file - JSP-Servlet
this message to all the employees when i upload a file then it fetch a data from that excel sheet i.e this matter will take a para meter values from the excel...retrieving of value from excel file  Dear sir, Thanks for sending
web service call in jsp page
web service call in jsp page  I am wandering on internet for hours looking for a simple and good example on how to create a simple JSP page to call a web service when you have a WSDL. I am using tomcat web server and eclipse
how to call javascript function from flex
how to call javascript function from flex  how to call javascript function from flex
retrieving of value from excel file - JSP-Servlet
retrieving of value from excel file  Dear sir, Thanks for sending a code now i am getting a particular column value i.e EmailId column for snding a massmails,now i have to get a particular column values i.e Name(A),EL(B
not able to get values from jsp file - JSP-Servlet
not able to get values from jsp file  hi thanks for u feedback, her am sending the file jsp and servlet but in the servlet file am not able to get... remove encrtype from form tag its work fine please go through the file
Getting Parameter from a css styled jsp file to a java servlet file...
Getting Parameter from a css styled jsp file to a java servlet file... ...; java servlet file-- /* * To change this template, choose Tools... is it not getting the parameter??? How do i accept the value in the servlet file
How to call java method on Button click in jsp?
How to call java method on Button click in jsp?  How to call java method on Button click in jsp
Advertisements
 

 

 

DMCA.com