Package com.sertaogames.mundoj.servlet

Source Code of com.sertaogames.mundoj.servlet.LoadCompra

package com.sertaogames.mundoj.servlet;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.sertaogames.mundoj.model.Compra;

public class LoadCompra extends BasicServlet {

  private static final long serialVersionUID = 1L;

  @Override
  protected void execute(HttpServletRequest req, HttpServletResponse resp) {
   
    Compra compra = jdo.findById(Compra.class, Long.valueOf(req.getParameter("id")));
    req.setAttribute("compra", compra);
    compra.loadJSON();
   
    try {
      getServletContext().getRequestDispatcher("/detalhe-compra.jsp").forward(req, resp);
    } catch (Exception e) {
      e.printStackTrace();
    }
   
  }

}
TOP

Related Classes of com.sertaogames.mundoj.servlet.LoadCompra

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.