1 / 24

MySQL, JavaBeans and File Upload

MySQL, JavaBeans and File Upload. Download war file dbjavabean.war from the http://douap.uap.asia. Required Libraries in WEB-INF/lib folder. Digesting the JSP files. File i ndex.jsp. Eclipse path for the upload. Note that the upload code is included. Change to /.

lana
Download Presentation

MySQL, JavaBeans and File Upload

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MySQL, JavaBeans and File Upload

  2. Download war file dbjavabean.war from the http://douap.uap.asia

  3. Required Libraries in WEB-INF/lib folder

  4. Digesting the JSP files.

  5. File index.jsp

  6. Eclipse path for the upload Note that the upload code is included Change \ to / Replace the Eclipse path with the actual deployment path in Tomcat

  7. Using the MyDB.java class

  8. File MyDB.java Get only one record Store the values in a HashMap Values are of type String

  9. Reading HashMap in index.jsp Set record id in MyDB bean From public HashMap<?,?> getMap()

  10. Code of HashMap and ArrayList

  11. Flow

  12. Get more than one record HashMap in an ArrayList Refresh content

  13. Reading ArrayList in index.jsp The Hashmap ArrayList

  14. File upload.jsp • Includes image resize, database, and upload.

  15. Value of path is from index.jsp. Set it right before uploading. Check for file permissions.

  16. Understanding what is passed by the form name and value pairs of the form

  17. Retrieve the file and store it in the hard drive based on the path

  18. For thumbnails, resizing the file based on the size • Store in the database

  19. Update database

  20. File slideshow.jsp • Variable start dictates what the next image to show • Get all images,

  21. Get one image

  22. Test Upload using Eclipse Tomcat

  23. Refresh Project Explorer to show the uploaded file. • Refresh page to reflect the uploaded image

  24. Study the code. Recode the your menu using JavaBean.

More Related