Hi
I ran a standalone application that uses jxl and it works fine but when I imported the class file (writer.WriteExcel.class), generated in my project, into a .jsp file I get this message:
An error occurred at line: 1 in the generated
java file
The type jxl.write.WritableSheet cannot be resolved. It is indirectly referenced from required .class files
An error occurred at line: 1 in the generated java file
The type jxl.write.WriteException cannot be resolved. It is indirectly referenced from required .class files
An error occurred at line: 1 in the generated java file
The type jxl.write.biff.RowsExceededException cannot be resolved. It is indirectly referenced from required .class files
An error occurred at line: 215 in the
jsp file: /coverage/testCoverageMask1.jsp
jxl.WorkbookSettings cannot be resolved to a type
212: WriteExcel writeExcel = new WriteExcel();
213: File fw = new File(filename);
214:
215: jxl.WorkbookSettings wbSettings = new jxl.WorkbookSettings();
216:
217: wbSettings.setLocale(new Locale("en", "EN"));
218:
An error occurred at line: 215 in the jsp file: /coverage/testCoverageMask1.jsp
jxl.WorkbookSettings cannot be resolved to a type
212: WriteExcel writeExcel = new WriteExcel();
213: File fw = new File(filename);
214:
215: jxl.WorkbookSettings wbSettings = new jxl.WorkbookSettings();
216:
217: wbSettings.setLocale(new Locale("en", "EN"));
218:
An error occurred at line: 219 in the jsp file: /coverage/testCoverageMask1.jsp
jxl.write.WritableWorkbook cannot be resolved to a type
216:
217: wbSettings.setLocale(new Locale("en", "EN"));
218:
219: jxl.write.WritableWorkbook workbook = jxl.Workbook.createWorkbook(file, wbSettings);
220: workbook.createSheet("DVR Test", 0);
221: jxl.write.WritableSheet excelSheet = workbook.getSheet(0);
222: createLabel(excelSheet);
An error occurred at line: 219 in the jsp file: /coverage/testCoverageMask1.jsp
jxl.Workbook cannot be resolved to a type
216:
217: wbSettings.setLocale(new Locale("en", "EN"));
218:
219: jxl.write.WritableWorkbook workbook = jxl.Workbook.createWorkbook(file, wbSettings);
220: workbook.createSheet("DVR Test", 0);
221: jxl.write.WritableSheet excelSheet = workbook.getSheet(0);
222: createLabel(excelSheet);
An error occurred at line: 219 in the jsp file: /coverage/testCoverageMask1.jsp
file cannot be resolved
216:
217: wbSettings.setLocale(new Locale("en", "EN"));
218:
219: jxl.write.WritableWorkbook workbook = jxl.Workbook.createWorkbook(file, wbSettings);
220: workbook.createSheet("DVR Test", 0);
221: jxl.write.WritableSheet excelSheet = workbook.getSheet(0);
222: createLabel(excelSheet);
An error occurred at line: 221 in the jsp file: /coverage/testCoverageMask1.jsp
jxl.write.WritableSheet cannot be resolved to a type
218:
219: jxl.write.WritableWorkbook workbook = jxl.Workbook.createWorkbook(file, wbSettings);
220: workbook.createSheet("DVR Test", 0);
221: jxl.write.WritableSheet excelSheet = workbook.getSheet(0);
222: createLabel(excelSheet);
223: createContent(excelSheet);
224:
here is what I wrote in my .jsp file:
<%@ page import="writer.*"%>
<%@ page import="JSP_connection.build.classes.connection.*"%>
<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*, java.sql.Connection, java.sql.DriverManager, java.sql.SQLException, java.text.DateFormat, java.util.*, java.lang.Math, java.io.*, java.net.*, jxl.*, jxl.CellView.*, jxl.Workbook.*, jxl.WorkbookSettings.*,jxl.format.Colour.*, jxl.format.UnderlineStyle.*, jxl.write.Label.*, jxl.write.Number.*, jxl.write.WritableFont.*, jxl.write.WritableWorkbook.*, jxl.write.WritableCell.*" errorPage="" %>
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
.
.
....
<%
int i=0;
String variant = request.getParameter("variant");
String productType = request.getParameter("productType");
String filename = "C:\\xls\\Summary_"+variant+"_"+productType+".xls";
WriteExcel writeExcel = new WriteExcel();
File fw = new File(filename);
jxl.WorkbookSettings wbSettings = new jxl.WorkbookSettings();
wbSettings.setLocale(new Locale("en", "EN"));
jxl.write.WritableWorkbook workbook = jxl.Workbook.createWorkbook(file, wbSettings);
workbook.createSheet("DVR Test", 0);
jxl.write.WritableSheet excelSheet = workbook.getSheet(0);
createLabel(excelSheet);
...
.
.
I am using
Tomcat 5.5
I have put jxl.jar in the java class path
and in ROOT\WEB-INF\lib