To be more precise: Apache POI HSSF/XSSF. It isn't part of Sun Java or so as you seem to think.
You can use Apache POI to read Excel files and convert them to useable Java objects.
That said, you shouldn't be doing this in a JSP. Writing raw Java code in a JSP file instead of Java classes is receipt for trouble. JSP is a presentation technology, use it where it is for. Use taglibs and EL only, no scriptlets.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: importing data from excel to Mysql database using jsp code