Jump to content
Changes to the Jaspersoft community edition download ×

problem when access printin java class in jsp


2006 IR Open Dicussion

Recommended Posts

By: xiaoyu - justxiaoyu

problem when access printin java class in jsp

2006-03-10 02:08

Hi,

when i try to access my printing java class from my jsp, it gives me this error when i compile my jsp page : -

 

Stacktrace:

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

 

 

root cause

 

javax.servlet.ServletException: org/apache/commons/digester/Digester

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)

org.apache.jsp.ling.lingtest1_jsp._jspService(org.apache.jsp.ling.lingtest1_jsp:96)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

 

 

root cause

 

java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester

net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:142)

net.sf.jasperreports.engine.MMConnDB.printRpt(MMConnDB.java:165)

org.apache.jsp.ling.lingtest1_jsp._jspService(org.apache.jsp.ling.lingtest1_jsp:59)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

 

below is my java class :-

 

 

public void printRpt(){

try{

JR = JasperCompileManager.compileReport("C:/Report/test1.jrxml");

JP = JasperFillManager.fillReport(JR,new HashMap(),conn);

}catch(Exception e){

System.out.println("Printing Error");

}

 

}

 

 

public void genPdfRpt(){

 

try{

 

JasperExportManager.exportReportToPdfFile(JP,"C:/ling.pdf");

 

}catch(Exception e){

System.out.println("Error print to pdf");

}

 

}

 

please help, thanks

 

 

 

 

 

 

 

By: xiaoyu - justxiaoyu

RE: problem when access printin jav

2006-03-10 02:20

Hi, i managed to solve it by adding the jasper report jar file to tomcat lib.

thanks

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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...