Escolar Documentos
Profissional Documentos
Cultura Documentos
Delphi
IDE
JDBC
JDK
JSP
Swing
Servlet
PHP
JTAGUA
JAVA + JSP + DELPHI + PHP + SERVLET
buscar
INICIO UNCATEGORIZED TUTORIAL DE JSP (22): ALTAS, BAJAS Y MODIFICACIONES EN UNA TABLA DE UNA BASE DE
DATOS MYSQL CON JSP.
@include Apache 2 Apache HTTP aviAWT Componentes Conector/J Conector J - MySQL Crystal
ReportCurso JSP Ejemplo Expresiones PHPFileZilla FTP Server Format HM NIS EditHola
Mundo IDE
BoxKENAI
Linux Mercury Mail Transport System MySQL MySQL 5.1 NetbeansNetbeans 6.5 NetBeans
6.7NetBeans 6.8
reservadas
JSP/SERVLETSJTextField JvDBSearchCombo
Microsystem
swingTButton
XAMPPXDEBUG
BLOGROLL
DELPHI
About.com
Club delphi
IDE
Eclipse IDE
NetBeans IDE
JAVA
GUJ (Mexico)
GUJ (Uruguay)
Java Hispano
java.net
JSP/SERVLETS
Eclipse + JSP
Recursos JSP
PHP
Manual PHP
Recursos PHP
PYTHON
SGBD
MySQL
PostgreSQL
VISITAS:
548,441 hits
META
Registrarse
Acceder
WordPress.com
buscar
1 Votes
con
Iniciamos seguidamente una sesin de Netbeans y hacemos desde el men principal Archivo,
Proyecto nuevo, Java Web, Web Application, llamamos al proyecto GesTablaJSP y sustituimos
el archivo index.jsp plantilla por el siguiente cdigo:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<%-Document : index
Created on : 25-dic-2012, 10:05:15
Author : Jtaguaa
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Actualizar, Eliminar, Crear registros.</title>
</head>
<body>
<form action="AECTabla.jsp" method="post" name="Actualizar"></form>
<table>
<tr>
<td>ISBN</td>
<input type="text" name="isbn" value="" size="40"/>
</tr>
<tr>
<td>Ttulo</td>
<input type="text" name="titulo" value="" size="50"/>
</tr>
<tr><td> Action </td>
<td>
<input type="radio" name="Action" value="Actualizar" /> Actualizar
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
donde puede verse que se trata de cdigo HTML con JSP que describe un formulario. Esto es
lo que ms tarde en el Modelo, Vista Controlador ser la Vista, es decir, la presentacin de
los datos de los distintos campos de la tabla.
La ejecucin de dicho archivo presenta en el cliente o en el browser la pantalla
1
2
3
4
5
6
7
8
9
<%-Document : AECTabla
Created on : 25-dic-2012, 10:11:06
Author : Jtaguaa
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import = "java.sql.*" %>
<%
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
}
} catch (SQLException
ls_result = "Error al
ls_result += " <br/>"
}
}
%>
html>
<html>
<head><title>Updating
<body>
e) {
cerrar la conexin.";
+ e.toString();
a Database</title></head>
Para dar de alta un libro entraremos la informacin correspondiente al libro cuyo ttulo es Java
Servlet Programming (2ed) y el isbn 0596000405, es decir
Si pulsamos Submit,
2.
3.