Error in Tomcat

0

That there are friends I have a problem with Tomcat when trying to run a Servlet where I have a query for a shopping cart send me the following error

java.lang.UnsupportedOperationException: Not supported yet.
    Modelo.DetalleVenta.<init>(DetalleVenta.java:20)
    Controlador.ServletControlador.anadirCarrito(ServletControlador.java:56)
    Controlador.ServletControlador.processRequest(ServletControlador.java:40)
    Controlador.ServletControlador.doPost(ServletControlador.java:107)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)

This is my code in html and it's fine that I think, and I guess it's the server's problem they could help me.

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="java.util.*"%>
<%@page import="Modelo.*"%>

<!DOCTYPE html>
<%
Producto p = ProductoDB.obtenerProducto(Integer.parseInt(request.getParameter("id")));
%>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>JSP Page</title>
</head>
<body>
  <table border="0" width="1000" align="center">
    <tr bgcolor="skyblue">
      <th><a href="index.jsp">Catalogo</a></th>
      <th><a href="registrarProducto.jsp">Registrar Producto</a></th>
      <th><a href="registrarVentas.jsp">Registrar Venta</a></th>
      <th><a href="consultarVentas.jsp">Consultar Ventas</a></th>
      <th><a href="ServletLogueo=cerrar">Cerrar</a></th>
      <th width="200"></th>
    </tr>
  </table>

  <h2 align="center">Añadir al Carrito</h2>
  <table border="0" width="500" align="center">
    <form method="post" action="ServletControlador">
      <tr>
        <th rowspan="5"><img src="imgs/<%= p.getImagen()%>" width="140" height="140"></th>
        <th>Codigo</th>
        <th><input type="text" name="txtCodigo" value="<%= p.getCodigoProducto()%>" readonly></th>
      </tr><tr>
        <th>Nombre</th>
        <th><input type="text" name="txtNombre" value="<%= p.getNombre()%>" readonly></th>
      </tr><tr>
        <th>Precio</th>
        <th><input type="text" name="txtPrecio" value="<%= p.getPrecio()%>" readonly></th>
      </tr><tr>
        <th>Cantidad</th>
        <th><input type="number" value="0" min="0" name="txtCantidad" value="0"></th>
      </tr>
      <tr>
        <th colspan="3"><input type="submit" value="Añadir" name="btnAnadir"></th>
      </tr>
      <input type="hidden" name="accion" value="anadirCarrito">
    </form>
  </table>
</body>
</html>
    
asked by Dan Hermes Reyes Osnaya 30.11.2017 в 16:36
source

0 answers