suggest me a way on how to upload file using JSP to mysql database

Google "Java file upload", then rather than writing the stream you get from the request to a file, write it to a DB column using the setAsciiStream, setBinaryStream, or setCharacterStream of PreparedStatement, read the API for that method and the Sun Tutorials (or the MySQL documentation which comes with complete examples) for JDBC in general.


And use a Servlet, not a JSP. And regardless of which one you use, the DB stuff should not be a part of it. Rather that should be in a Bean (or some other external object), not the Servlet or JSP itself.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.