Join Todd Perkins for an in-depth discussion in this video Connect to a database, part of Learning Java Applications.
- [Voiceover] Our last step here is…to connect to our database.…So we have our JSP file, you want to write…the code to connect to the database.…So on line 6 in my JSP file, I'm going to…<%@, and then page, import, and…then I'm going to import java.sequel.*…and then I'll make sure to close out that tag.…So %>, so that's going to import…the classes that we're going to use.…I'm just going to add some spaces…in between the equal sign and import.…
So now the next step is to just delete…the existing Java code that we have,…so printing out the message and string message.…And what we want to do is create an unordered list and…each item in the database, we want to print out the name.…So if we look at this tab right here, you don't…have to go there, you can just look at my screen,…we have the three names inside of…our database in the name column.…So we want to print these out and that's it.…So back in index.jsp, I'm working in these tags…so that I can write Java code,…and I need to create my connection.…So first, declare the connection.…
- Installing Java and Eclipse
- Understanding basic Java syntax
- Handling Java errors
- Creating a UI with Swing
- Creating tables and connecting to data sources for tables
- Publishing a JAR file
- Installing NetBeans
- Creating JSP pages
- Setting up and connecting to databases
- Creating Java-based Android Studio projects
Skill Level Beginner
1. Install Java and an IDE
2. Java Basics Review
3. Create a User Interface with Swing
4. Tables and Data Sources
5. Application Distribution and Deployment
Publish a runnable JAR file2m 32s
6. Server-Side Java: JSP and Databases
7. Android Development
Next steps1m 16s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.