ações e métodos post e get em aplicações java€¦ · ações e métodos post e get em...
TRANSCRIPT
Disciplina:
MsC. Alexandro Vladno
Edmilson Campos
MsC. Fábio Procópio
Esp. Felipe Dantas
MsC. João Maria
MsC. Liviane Melo
Corpo docente:
Ações e métodos post e get em aplicações Java
Programação Web
AULA 04
▪
»
▪
»
▪
»
▪
»
»−
▪
»
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>
<body>
<h1>Formulário de autenticacão</h1>
<form action="url" method="get">
Nome: <input type="text" name="login" /> <br />
Senha: <input type="password" name="pwd" /><br />
<input type="submit" name="send" value="enviar"/>
<input type="hidden" name="action" value="login"/>
</form>
</body>
</html>
Edmilson Campos ([email protected]) 5
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>
<body>
<h1>Formulário de autenticão</h1>
<form action="http://localhost:8048/">
Nome: <input type="text" name="login" /> <br />
Senha: <input type="password" name="pwd" /><br />
<input type="submit" name="send" value="enviar"/>
<input type="hidden" name="action" value="login"/>
</form>
</body>
</html>
http://localhost:8048/?login=edmilson&pwd=senha&send=enviar&action=login
Edmilson Campos ([email protected]) 8
Edmilson Campos ([email protected]) 9
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Formulário de autenticacão - POST</title>
</head>
<body>
<h1>Formulário autenticacão POST</h1>
<form action="http://localhost:8048/" method="post">
<label>Nome: </label><input type="text" name="login" /> <br />
<label>Senha: </label><input type="password" name="pwd" /><br />
<input type="submit" name="send" value="enviar"/>
<input type="hidden" name="action" value="login" />
</form>
</body>
</html>
http://localhost:8048/
Edmilson Campos ([email protected]) 10
Edmilson Campos ([email protected]) 11
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Exemplos de tipos de INPUT</title>
</head>
<body>
<h1>Exemplos de tipos de INPUT</h1>
<form action="http://localhost:8088/" method="get">
<label>usuário: </label><input type="text" name="username" value="user" /> <br />
<label>senha: </label><input type="password" name="password" value="pass" /> <br />
<dl>
<dt>Tipo de login</dt>
<dd><input type="radio" name="usertype" value="professor"
checked="checked">Professor</input></dd>
<dd><input type="radio" name="usertype" value="student">Aluno</input></dd>
</dl>
<input type="reset" value="Limpar campos" />
<input type="submit" name="button" value="enviar" />
<input type="button" name="button" value="Nada faz" />
Edmilson Campos ([email protected]) 13
<dl>
<dt>informações do usuário</dt>
<dd><input type="checkbox" name="cookies"
value="userinfo">Salvar login do usuário</input></dd>
<dd><input type="checkbox" name="cookies"
value="auto_login">Autentica automaticamente</input></dd>
<dd><input type="checkbox" name="cookies"
value="disabled"
disabled="disabled">Marcação desabilitada</input></dd>
</dl>
<label>enviar foto: </label><input type="file" name="picture" />
<input type="hidden" name="action" value="login" />
</form>
</body>
</html>
Edmilson Campos ([email protected]) 14
Edmilson Campos ([email protected]) 15
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Exemplo do TextArea</title>
</head>
<body>
<h1>Exemplos do TextArea</h1>
<form action="http://localhost:8088/" method="post">
<label>título: </label><input type="text" name="username" value="user" /> <br />
<label>mensagem: </label><br />
<textarea rows="7" cols="50">Mensagem . . .</textarea> <br />
<input type="submit" name="button" value="enviar" />
<input type="hidden" name="action" value="send_email" />
</form>
</body>
</html>
Edmilson Campos ([email protected]) 16
Edmilson Campos ([email protected]) 17
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Exemplo do SELECT</title>
</head>
<body>
<h1>Exemplos do SELECT</h1>
<form action="http://localhost:8088/" method="post">
<label>Linguagem que trabalha: </label><br />
<select name="work_language">
<option value="0" selected="selected">nenhuma</option>
<option value="1">C</option>
<option value="2">C++</option>
<option value="3">Java</option>
<option value="4">C#</option>
<option value="5">Smalltalk</option>
</select>
<br />
Edmilson Campos ([email protected]) 18
<label>Linguagens que conhece:</label><br />
<select name="knows_language" multiple="multiple" size="5">
<option value="1">C</option>
<option value="2">C++</option>
<option value="3">Java</option>
<option value="4">C#</option>
<option value="5">Smalltalk</option>
</select>
<br />
<input type="submit" name="button" value="enviar" />
<input type="hidden" name="action" value="send_email" />
</form>
</body>
</html>
Edmilson Campos ([email protected]) 19
Edmilson Campos ([email protected]) 20
▪http://www.corewebprogramming.com/
▪ http://www.w3schools.com/
Edmilson Campos ([email protected]) 22