I have already added jar file in WEB-INF/lib folder.I am using Eclipse plugin for GWT. Can you clearify what exactly you mean by keeping them "on the server"?
On Jul 19, 4:33 am, mdwarne <mike.wa...@gmail.com> wrote: > Make sure your jars are in your webapp WEB-INF/lib folder on the > server.. > Mike. > > On Jul 16, 12:29 am, rajan kochhar <rajan_kochhar2...@yahoo.com> > wrote: > > > > > I want to read the contents of a file "a.xls" i have kept in war. I am > > creating a servlet as follows: > > > import java.io.*; > > > import javax.servlet.http.HttpServlet; > > import javax.servlet.http.HttpServletRequest; > > import javax.servlet.http.HttpServletResponse; > > > import com.cummins.lms.shared.Streams; > > > import jxl.Sheet; > > import jxl.Workbook; > > import jxl.read.biff.BiffException; > > > publicclassExcelUtility extends HttpServlet{ > > public void doGet(HttpServletRequest request, HttpServletResponse > > response) > > { > > try { > > FileInputStream is = new FileInputStream("a.xls"); > > Workbook workBook = Workbook.getWorkbook(is); > > Sheet sheet = workBook.getSheet(0); > > System.out.println(workBook.getNumberOfSheets()); > > } catch (Exceptione) { > > // TODO Auto-generated catch block > > e.printStackTrace(); > > } > > > } > > > } > > > On calling the servlet,it gives anexception: > > > com.google.apphosting.utils.jetty.JettyLogger warn > > WARNING: Error for /excel > > java.lang.NoClassDefFoundError: jxl/Workbook > > at com.cummins.lms.server.ExcelUtility.doGet(ExcelUtility.java:27) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:693) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) > > at > > org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: > > 511) > > at org.mortbay.jetty.servlet.ServletHandler > > $CachedChain.doFilter(ServletHandler.java:1166) > > at > > com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFi > > lter.java: > > 51) > > at org.mortbay.jetty.servlet.ServletHandler > > $CachedChain.doFilter(ServletHandler.java:1157) > > at > > com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(Trans > > actionCleanupFilter.java: > > 43) > > at org.mortbay.jetty.servlet.ServletHandler > > $CachedChain.doFilter(ServletHandler.java:1157) > > at > > com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFile > > Filter.java: > > 122) > > at org.mortbay.jetty.servlet.ServletHandler > > $CachedChain.doFilter(ServletHandler.java:1157) > > at > > org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: > > 388) > > at > > org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: > > 216) > > at > > org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: > > 182) > > at > > org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: > > 765) > > at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: > > 418) > > at > > com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEn > > gineWebAppContext.java: > > 70) > > at > > org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: > > 152) > > at com.google.appengine.tools.development.JettyContainerService > > $ApiProxyHandler.handle(JettyContainerService.java:349) > > at > > org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: > > 152) > > at org.mortbay.jetty.Server.handle(Server.java:326) > > at > > org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: > > 542) > > at org.mortbay.jetty.HttpConnection > > $RequestHandler.headerComplete(HttpConnection.java:923) > > at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547) > > at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) > > at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) > > at > > org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java: > > 409) > > at org.mortbay.thread.QueuedThreadPool > > $PoolThread.run(QueuedThreadPool.java:582) > > > What am i doing wrong.Any alternative approach for reading an excel > > file or any other help will do. > > > Thanks -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.