scripts jsp

30jun10

Mejor no demorar mucho, acá va un pequeño ejemplo de una página jsp:

<%–
Document   : verdatos
Created on : 19/06/2010, 15:40:01
Author     : Administrador
–%>
<%!
String mensaje1 = “Bienvenidos “;
String mensaje2 = “a mi web”;
String mensaje = “”;
%>

<%
mensaje = mensaje1 + mensaje2;
%>

<%@page contentType=”text/html” pageEncoding=”UTF-8″%>
<html>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″ />
<title>Formulario de ingreso de datos</title>
</head>
<body>
<form action=”validacion.jsp” method=”get” id=”formulario”>
<%= mensaje %><br>
Ingresa nombre y apellido<br>
nombre:<input type=”text” name=”nombre” /><br>
apellido:<input type=”text” name=”apellido” /><br>
<input type=”submit” name=”Submit” value=”Aceptar” />
</form>
</body>
</html>

Marcado en negritas, podemos ver un comentario,  la declaración de 3 variables,  un pequeño código java, una propiedad de página, y una impresión en pantalla del valor de una variable.

Advertisement


No Responses Yet to “scripts jsp”

  1. Dejar un comentario

Deja un comentario

Fill in your details below or click an icon to log in:

Logo de WordPress.com

You are commenting using your WordPress.com account. Log Out / Cambiar )

Twitter picture

You are commenting using your Twitter account. Log Out / Cambiar )

Facebook photo

You are commenting using your Facebook account. Log Out / Cambiar )

Connecting to %s


Seguir

Get every new post delivered to your Inbox.