hi, I m having problem using jasperreports with servlets and tomcat so i m giving my code and error generated. Please also tell me where to put .jasper and .jrxml files in tomcat dir and whether their path in servlet shud be relative or absolute? Please dont tell me that resultset can be directly passed to .jrxml coz i know it actually this is just sample code actually my resultset will change according to values enterd by user input thats why i m executing it in servlet and then sending to .jasper file.
i have included every jar file from dist and lib directories of jasperreports in build path in eclipse as external jar files. But dont know if other jar file should be present in tomcat dir and where? [ January 03, 2007: Message edited by: Varun Kumar ]
Genreally, jars that are used by a single application are placed within that application's WEB-INF/lib folder.
For jars to be shared across multiple applicartions, Tomcat provides common locations for those, but let's just concentrate on your one app for now.
Are you running the app from within eclipse, or in a standalone instance of Tomcat?
Varun Kumar
Greenhorn
Joined: Jan 02, 2007
Posts: 4
posted
0
i m running application from within eclipse. [ January 03, 2007: Message edited by: Varun Kumar ]
Varun Kumar
Greenhorn
Joined: Jan 02, 2007
Posts: 4
posted
0
i have put all jars in the WEB-INF/LIB dir of the application and now i m getting this error: java.lang.NullPointerException at java.io.ObjectInputStream$PeekInputStream.read(Unknown Source) at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source) at java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown Source) at java.io.ObjectInputStream.readStreamHeader(Unknown Source) at java.io.ObjectInputStream.<init>(Unknown Source) at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:191) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:580) at net.sf.jasperreports.engine.JasperRunManager.runReportToPdfStream(JasperRunManager.java:368) at JustTest.doPost(JustTest.java:43) at JustTest.doGet(JustTest.java:25) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Unknown Source) -------------------------------------------------------------------------------------------------------------------------------
Kindly tell me where to put .jrxml and .jasper file in tomcat directory.
[ January 03, 2007: Message edited by: Varun Kumar ] [ January 03, 2007: Message edited by: Varun Kumar ]