944,153 Members | Top Members by Rank

Ad:
  • JSP Discussion Thread
  • Unsolved
  • Views: 7145
  • JSP RSS
Oct 4th, 2007
0

uploading file using JSP to mysql database

Expand Post »
suggest me a way on how to upload file using JSP to mysql database
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nikhita is offline Offline
15 posts
since Oct 2007
Oct 4th, 2007
1

Re: uploading 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.
Moderator
Reputation Points: 1471
Solved Threads: 490
Industrious Poster
masijade is offline Offline
4,043 posts
since Feb 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JSP Forum Timeline: Incomplete Loading of JSP page
Next Thread in JSP Forum Timeline: jsp and mysql





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC