Excel – How to import .class file in jsp page which is not in standard library


I would like to read excel file in java. For that no classes are provided by java standard library. I have downloaded required classes but I am not able to import them.

One solution is jsp:usebean but they are near about 300-400 classes so I can't use usebean.

Please suggest another solution.

Best Solution

Do not write Java code in JSP files. There it is not for. Use a real Java class. In this case a Servlet class is the right choice. You can make use of the doGet() method to preprocess requests before displaying results in a JSP file. As it's not entirely clear what you would like to do with the Excel file after all, I can't give a more detailed code example.

To learn more about JSP/Servlets, I can recommend the tutorials at Coreservlets.com.

Good luck.

Related Question