Aqui pongo el código para que lo vean:
formulario.jsp:
Código:
<%@ page language="java" contentType="text/html"%> <!doctype html> <%@page import="recargafacil.Obten"%> <html lang="es-mx"> <head> <title>Acceso Clientes</title> <meta name="author" content="Luis Serrano"> <meta name="generator" content="Desarrollado por Econocell"> <link href="favicon.ico" rel="shortcut icon"> <link href="cupertino/jquery.ui.all.css" rel="stylesheet" type="text/css"> <link href="RecargaFacil.css" rel="stylesheet" type="text/css"> <link href="clientes.css" rel="stylesheet" type="text/css"> <script type="text/javascript" src="jquery-1.9.1.min.js"></script> <script type="text/javascript" src="jquery.ui.core.min.js"></script> <script type="text/javascript" src="jquery.ui.widget.min.js"></script> <script type="text/javascript" src="jquery.ui.button.min.js"></script> <script type="text/javascript"> $(document).ready(function () { $("#btn_menu").button(); }); </script> </head> <body onload="document.getElementById('cliente').focus(); return false;"> <div id="container"> <div id="wb_Image1" style="position:absolute;left:3px;top:0px;width:1360px;height:665px;z-index:3;"> <img src="images/preview2.png" id="Image1" alt="" style="width:1360px;height:665px;"></div> <div id="wb_frm_cliente" style="position:absolute;left:449px;top:208px;width:467px;height:147px;z-index:4;"> <form name="ACREDITACIONES" method="post" action="Obten" enctype="text/plain" accept-charset="UTF-8" target="_self" id="frm_cliente"> <input type="text" id="txt_cliente" onchange="document.getElementById('envia').focus(); return false;" style="position:absolute;left:148px;top:54px;width:152px;height:37px;line-height:37px;z-index:0;" name="cliente" value="" maxlength="8" tabindex="1" autocomplete="off" required="required" pattern="[0-9-]*$" title="ingrese su código Econocell"> <div style="position:absolute;overflow:hidden;left:26px;top:39px;width:114px;height:70px;z-index:1"><p align="left"><strong><font style="font-size:21px" face="Arial">Código </font></strong><strong><font style="font-size:21px" face="Arial">Econocell:</font></strong> </p></div> <input type="submit" id="btn_enviar" name="enviar" value="enviar" style="position:absolute;left:322px;top:54px;width:108px;height:41px;z-index:2;" tabindex="3"> </form> </div> <input type="button" id="btn_menu" onclick="history.back(); return false;" name="regresar" value="menu principal" style="position:absolute;left:37px;top:73px;width:167px;height:50px;z-index:5;"> </div> </body> </html>
el servlet:
Código:
yo no le he cambiado nada...que pueden determinar de este código, gracias por sus comentarios /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package recargafacil; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * * @author Administrador */ @WebServlet(name = "Obten", urlPatterns = { "/Obten" }) public class Obten extends HttpServlet { /** * Processes requests for both HTTP <code>GET</code> and <code>POST</code> * methods. * <p> * @param request servlet request * @param response servlet response * <p> * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); try (PrintWriter out = response.getWriter()) { String nombre = request.getParameter("txt_cliente"); } } // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code."> /** * Handles the HTTP <code>GET</code> method. * <p> * @param request servlet request * @param response servlet response * <p> * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } /** * Handles the HTTP <code>POST</code> method. * <p> * @param request servlet request * @param response servlet response * <p> * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } /** * Returns a short description of the servlet. * <p> * @return a String containing servlet description */ @Override public String getServletInfo() { return "Short description"; }// </editor-fold> }