[/code]Boa tarde!!!
Alguém poderia me falar o que tem de errado no código abaixo?
Eu estou tentando apenas pegar os valores da pagina jsp e passar para a servlet e imprimir.
***********PAGINA: index.jsp<?xml version="1.0" encoding="ISO-8859-1" ?>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Portal CCO - Login</title>
<link href="CSS/login.css" rel="stylesheet" type="text/css" />
<style>
table {
background-image:url(Imagens/tabela.jpg);
width:460px; /*Largura da Tabela*/
height:226px; /*Altura da Tabela*/
position:absolute;
top:50%;
left:50%;
margin-left:-230px; /*Largura da Tabela Dividido por 2 e Negativo*/
margin-top:-113px; /*Altura da Tabela Dividido por 2 e Negativo*/
}
</style>
</head>
<body>
<form name="login" method="post" action="/TESTE" class="login">
<table width="460" height="237" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="434" height="31"> </td>
</tr>
<tr>
<td> <img src="Imagens/portalCCO.jpg" /></td>
</tr>
<tr>
<td><label> <font class="login">LOGIN</font>
</label></td>
</tr>
<tr>
<td height="27"> Para ter acesso ao portal entre com seu login e senha.</td>
</tr>
<tr>
<td height="21"><label> <font style="font-weight:bold">Usuário: </font><input type="text" name="user" class="campos" style="width:180px" />
</label></td>
</tr>
<tr>
<td height="24"><label> <font style="font-weight:bold">Senha: </font> <input type="password" name="senha" class="campos" style="width:120px" /></label> <input type="submit" value="Entrar" class="botao" /></td>
</tr>
<tr>
<td height="32"> </td>
</tr>
</table>
</form>
</body>
</html>
package teste;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class TESTE extends HttpServlet {
private static final long serialVersionUID = 1L;
public TESTE() {
super();
// TODO Auto-generated constructor stub
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
}
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
//processRequest(request, response);
String login = request.getParameter("login");
String senha = request.getParameter("senha");
//valida(login e senha);
System.out.println("Login: " + login + "Senha: " + senha);
}
}
**********PAGINA: web.xml
[code]
PortalCCO
TESTE
teste.TESTE