Skocz do zawartości
View in the app

A better way to browse. Learn more.

Forum PSX Extreme

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

JavaScript i połączenie z bazą danych

Featured Replies

Opublikowano

Witam,

 

chcę ustanowić podstawowe połączenie pomiędzy JSP, a bazą danych utworzoną w MySQL. Do programowania używam nakładki na Eclipse - GlassFisha. Poniżej wklejam mój kod

 

<%@page import="java.sql.*"%>

 

<html>

<head>

<title>Obtaining a Connection</title>

</head>

<body>

<h1>This Page Obtains a Connection to a Database and executes a query</h1>

<%

Class.forName("com.mysql.jdbc.Driver");

Connection connection=

DriverManager.getConnection("jdbc:mysql://localhost:3306/books");

 

Statement statement=

connection.createStatement();

ResultSet rs= statement.executeQuery("SELECT authorID, firstName, lastName FROM authors");

 

%>

</body>

</html>

 

Za chu.ja nie chce to działać. Ciągle wyskakuje mi błąd "javax.servlet.ServletException: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver". Domyślam się, że chodzi zapewne o odpowiedniego jara, ale zaimportowałem go do projektu poprzez Project->Properties->Build Path->Libraries->Add External Jar

 

 

Błagam, pomocy.

  • Wyświetleń 3,6 tys.
  • Dodano
  • Ostatniej odpowiedzi

Dołącz do dyskusji

Możesz dodać zawartość już teraz a zarejestrować się później. Jeśli posiadasz już konto, zaloguj się aby dodać zawartość za jego pomocą.
Uwaga: Twój wpis zanim będzie widoczny, będzie wymagał zatwierdzenia moderatora.

Gość
Dodaj odpowiedź do tematu...

Ostatnio przeglądający 0

  • Brak zarejestrowanych użytkowników przeglądających tę stronę.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.