1 14 package org.compiere.wstore; 15 16 import javax.servlet.*; 17 import javax.servlet.http.*; 18 import java.io.*; 19 import java.util.*; 20 import java.sql.*; 21 22 import org.apache.ecs.*; 23 import org.apache.ecs.xhtml.*; 24 import org.apache.log4j.Logger; 25 26 import org.compiere.util.*; 27 import org.compiere.www.*; 28 29 35 public class SingleItem extends HttpServlet 36 { 37 38 private Logger log = Logger.getLogger(getClass()); 39 40 private int m_AD_Client_ID = -1; 41 42 47 public void init(ServletConfig config) throws ServletException 48 { 49 super.init(config); 50 if (!WEnv.initWeb(config)) 51 throw new ServletException("SingleItem"); 52 m_AD_Client_ID = WEnv.getAD_Client_ID(config); 54 log.info("init - AD_Client_ID=" + m_AD_Client_ID); 55 } 57 60 public void destroy() 61 { 62 log.info("destroy"); 63 } 65 private static final String P_ITEM_NAME = "item_name"; 67 private static final String P_ITEM_NUMBER = "item_number"; 68 private static final String P_AMOUNT = "amount"; 69 private static final String P_QUANTITY = "quantity"; 70 private static final String P_UNDEFINED_QUANTITY = "undefined_quantity"; 71 private static final String P_RETURN_URL = "return"; 72 private static final String P_CANCEL_URL = "cancel_return"; 73 private static final String P_SUBMIT = "SUBMIT"; 75 76 77 78 85 public void doGet(HttpServletRequest request, HttpServletResponse response) 86 throws ServletException, IOException 87 { 88 log.info("doGet from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); 89 } 91 92 99 public void doPost(HttpServletRequest request, HttpServletResponse response) 100 throws ServletException, IOException 101 { 102 log.info("doPost from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); 103 } 105 } | Popular Tags |