Parameters passed by client One of the most important features to make the web an interactive environment is the passing of parameters from client so the.

Slides:



Advertisements
Presentaciones similares
El mecanismo básico de interacción entre el usuario y un sitio web esta dado por el uso de formularios html. El server envía un formulario que el browser.
Advertisements

-go Verbs There is a small but very important group of verbs that we call the -go verbs. These verbs are: Hacer: to make/do Poner: to put Decir: to say.
Comunicación con el servidor, RPC GWT Google Web Toolkit Prof. Ing
"java del lado del servidor" Servlet y JSP Java Server Pages.
Introduccion a las páginas WEB HTML
El mecanismo básico de interacción entre el usuario y un sitio web esta dado por el uso de formularios html. El server envía un formulario que el browser.
Talking about weather Discussing the weather is a very human thing to do, and every language has its own way of doing it. If you think about it, the weather.
English Version El objetivo de esta guía es orientar al proveedor acerca de la realización de consultas de los pagos. Por favor haga uso de las flechas.
Archivos y Búsqueda Secuencial
Programación orientada a objetos
Direct Object Pronouns Bill hit the ball. "Ball" receives the action of the verb "hit." Sherry reads the book. "Book" receives the action of the verb.
Servlets, JSP, JavaBEANS,JDBC
Parts of the Computer Las partes de la computadora
Telling Time.
¿Qué son los formularios? Los formularios son posiblemente la herramienta más utilizada en Internet para obtener datos e información acerca de la gente.
Servlets 18 de Marzo de Índice ¿Qué es un Servlet? ¿Cuándo y por qué usar Servlets? Estructura básica de un HttpServlet Servlet simple que genera.
JAVA: Servlets Diseño de aplicaciones web
Fernando Alonso Blázquez Nicolás Serrano Bárcena Servlets 8 de Abril de 2008.
Aplicaciones Web M.C. Jorge Eduardo Ibarra Esquer
Objetivo: Which form of the verb should we use? Are we pronouncing the vocabulary correctly? Hagan Ahora: El papel de APT P. 69, Actividad 2.
Informatic Topics M. Sc. Juan Carlos Olivares Rojas February, 2009.
Gustar What is pleasing to you?.
What has to be done today? It can be done in any order. Make a new ALC form Do the ALC Get two popsicle sticks Get 16 feet of yarn. That is 4 arms width.
Eng. Ivan E. Juárez. Preliminary Activity The different kind of tools that we will use during this course require to use a gmail account, even if you.
Ihr Logo PHP Parte 4 “manejo de formularios”. Your Logo Formularios  El proceso para el manejo de FORMULARIOS html requiere generalmente dos páginas,
1.8B Tomando apuntes….  You should view the following PowerPoint presentation to learn the preterite forms of the verb “hacer” and “dar”.  Read through.
JAVA: Servlets Diseño de servicios web © María de los Santos Pérez Hernández
Servlets Servlets son módulos que extienden a servidores orientados a request/response, como por ejemplo Servidores Web “java-enabled”. Un servlet puede.
Servlets 10 de Mayo de 2006.
First Grade – High Frequency Word Reading Competition Classroom Competition Created by: Malene Golding School Improvement Officer: Kimberly Fonteno.
Digital Photography: Selfie Slides Your Name Date Class Period.
Digital Photography: Selfie Slides By: Essence L. Thomas.
¿Qué haces en la escuela? Question words, objects, yo-go’s.
Talking about weather Discussing the weather is a very human thing to do, and every language has its own way of doing it. If you think about it, the weather.
Formal Commands! Telling people what to do…… You speak, or you are speaking……Hablas, estás hablando This is different from telling (commanding) someone.
Digital Photography: Selfie Slides Your Name Date Class Period.
Confidential // Neoris 1 Confidential // Do Not Reproduce without prior written permission from Neoris Servlets.
Gustar, Aburrir, y Interesar
Digital Photography: Selfie Slides Your Name Date Class Period.
Pasos a seguir para asociar un MCP o una persona a la empresa
Formal Commands! Ten-Hut! In this presentation, you will learn about making commands in Spanish.
Viernes 29 de agosto Máx. : 30° Mín. : 23° Hazlo ahora 3 min Cada quien en su casa es rey.
SPANISH 8 TH GRADE With Señorita Hall Classes #1-5 – August- September 2013 Capítulo 1: Lectura 1 ● El cuento del gato Warm-Up In your carpeta fill out.
The Future Tense -original PowerPoint created by Mrs. Shirley of North Intermediate High School in Broken Arrow, OK.
Page 15 Realidades 2 Tener, Poner, Hacer The Verb TENER  The verb TENER, which means “to have” follows the pattern of other -er verbs.
¡Hola, buenas tardes! Please write your desk number on your disclosure paper to the left of the large C. Place the paper on the correct color, on the table,
Creación de páginas Web (II) Formularios Pau Barceló Forteza
Indirect Object Pronouns Original PowerPoint was by Ms. Martin of Tri-Center Community Schools.
ECOM-6030 PASOS PARA LA INSTALACIÓN DE EASYPHP Prof. Nelliud D. Torres © - Derechos Reservados.
¡Hola! ✤ Study for your vocab quiz for 5 minutes! ✤ Unit 2 Apuntes 1 ONLY ✤ Make sure you can translate from English to Spanish!
To be, or not to be? Let’s start out with one of the most important verbs in Spanish: ser, which means “to be.”
Temario Java 2 Enterprise Edition Arquitectura Especificación Servlets Contenedores Cookies Sesiones.
El Objeto Directo Direct Object Pronoun Sra. Altamirano.
Crear Referencias Febrero 10, Ingresar al portal Ingresar a la siguiente url: Ya que se haya entrado a la URL.
DOLER y SENTIRSE los apuntes Sra. Clauson– Espanol I.
Verbs like Gustar Notes/ Examples.
LAS PREGUNTAS (Question Formation). Asking “yes/no” questions To ask spoken questions that can be answered with a simple “yes” or “no,” simply raise the.
Trabajar con SERVLETS. Índice Qué son los Servlets Para qué sirven Cómo se utilizan Ejemplo Cómo probar un Servlet.
© Copyright Showeet.com E XAMPLE 1 A BSTRACT 3D P APER I NFOGRAPHICS Your own text goes here.
To be, or not to be? Let’s start out with one of the most important verbs in Spanish: ser, which means “to be.”
To be, or not to be? Let’s start out with one of the most important verbs in Spanish: ser, which means “to be.”
Lo esencial de Internet
First Grade Dual High Frequency Words
Apuntes: Gustar Lección 2: En la clase.
Quasimodo: Tienes que hacer parte D de la tarea..
--To be pleasing to --Your likes & dislikes
Servlets Servlets Son modulos que extienden las funcionalidades de un servidor “java-enabled” Normalmente generan código HTML dinámicamente, el cual se.
Parametros enviados por el cliente
A PowerPoint Template Your Presentation Name. This text is a placeholder Main Content Page Layout 2 Copyright 2009.
Welcome to PowerPoint gdskcgdskfcbskjc. Designer helps you get your point across PowerPoint Designer suggests professional designs for your presentation,
Transcripción de la presentación:

Parameters passed by client One of the most important features to make the web an interactive environment is the passing of parameters from client so the server The client can pass parameters with the request according to the following format – –This means the server will receive 2 parameters: one with name param1 and value value1 and the other with name param2 and value value2 The servlet can ask for those values in the following way: –String valueOfParam1 = request.getParameter(“param1”); –String valueOfParam2 = request.getParameter(“param2”); Parameter names and values are strings Names of parameters are case sensitive (Param1 != param1)

import javax.servlet.http.*; import javax.servlet.*; import java.io.*; public class ServletParameter1 extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException { PrintWriter out = null; response.setContentType("text/html"); // obtaining parameter value for parameter named “firstname" String fname = request.getParameter(“firstname"); // obtaining parameter value for parameter named “lastname" String lname = request.getParameter(“lastname"); out = response.getWriter(); out.println( "Hello "+fname+" “+lname</h1"); out.close(); }

The normal way is to gather parameters with forms A Form is an HTML page which may contain graphical objects to gather information which is sent to the server automatically in an URL Collecting parameters Nombre: Apellido:

Collecting parameters Nombre: Apellido: y Definen el comienzo y fin de un “formulario” que se llena para transferir los datos al servidor ACTION= “…” define que acción se tomará, en este caso, a dónde se mandarán los datos ingresados una vez que se oprima el botón de submit

Collecting parameters Nombre: Apellido: <INPUT … es para definir un elemento de entrada de datos o de interacción Este elemento será transferido como parámetro con la URL TYPE define el tipo, en este caso se trata de un texto (TEXT) NAME es el nombre del elemento de input y también será el nombre del parámetro

Collecting parameters Nombre: Apellido: TYPE=SUBMIT define un elemento con forma de botón que al oprimirlo (click) contacta la URL definida en ACTION y envia como parámetros los contenidos de Los elementos definidos como INPUT VALUE=“……” define la leyenda que tendrá el botón

Al oprimir el botón se obtiene el Resultado que muestra la figura de abajo Fijarse en la URL que se generó Automáticamente con los parámetros

Este es el programa Jalisco, nunca pierde Ingresa un número cualquiera y luego oprime el botón: ¿ Qué página genera esto ?

import javax.servlet.http.*; import javax.servlet.*; import java.io.*; public class Jañisco extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException { PrintWriter out = null; response.setContentType("text/html"); // obtaining parameter value for parameter named “numero" String snum = request.getParameter(“numero"); // converting to integer valus int num = Integer.parseInt(snum); out = response.getWriter(); out.println( “Te gano con el "+(num+1)+"</h1"); out.close(); }

: El siguiente código HTML Servlet Calculadora Ingrese ambos operandos de una suma + Genera la siguiente página :

1 (Muy Fácil) Escriba el servlet ServletCalculadora que al ser contactadoResponda con la suma de ambos números 2 (Fácil) modifique el HTML de modo que la operación también sea ingresada por el usuario y el servlet haga la operación adecuada (solo se permite +, -, *, /

Other Input types we will use Radio: only one element between various alternatives can be chosen Select: like radiobutton but with puldown menu TextArea: like text but can contain many lines. Password: like text but does not show the content (***** instead of what you really input)

Radio Elija una laternativa Alternativa 1 Alternativa 2 Alternativa 3

Radio Elija una laternativa Uvas Peras Higos Mangos String alt = request.getParameter(“radio1”); if (alt.equals(“valor1”)) out.println(“Ud. Eligió Uvas”); else if (alt.equals(“valor2”)) out.println(“Ud. Eligió Peras”); else if(alt.equals(“valor3”) out.println(“Ud. Eligió Higos”); else out.println(“Ud. Eligió Mangos”); Código para chequear cuál alternativa se seleccionó

HTML SERVLET Preview Select (Elección entre varias alternativas con pul-down menu)

HTML SERVLET Ingrese aqui su opinion lo que se excriba aca saldra en el area pero se puede editar String texto; texto = request.getParameter(“Ta1”); Text Area