1 package edu.rice.rubis.beans.servlets; 2 3 import java.io.IOException ; 4 5 import javax.servlet.ServletException ; 6 import javax.servlet.http.HttpServlet ; 7 import javax.servlet.http.HttpServletRequest ; 8 import javax.servlet.http.HttpServletResponse ; 9 10 19 20 21 public class PutBidAuth extends HttpServlet 22 { 23 24 32 public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException , ServletException 33 { 34 ServletPrinter sp = null; 35 sp = new ServletPrinter(response, "PubBidAuth"); 36 37 String value = request.getParameter("itemId"); 38 if ((value == null) || (value.equals(""))) 39 { 40 sp.printHTMLheader("RUBiS ERROR: Authentification for bidding"); 41 sp.printHTML("No item identifier received - Cannot process the request<br>"); 42 sp.printHTMLfooter(); 43 return ; 44 } 45 46 sp.printHTMLheader("RUBiS: User authentification for bidding"); 47 sp.printFile(Config.HTMLFilesPath+"/put_bid_auth_header.html"); 48 sp.printHTML("<input type=hidden name=\"itemId\" value=\""+value+"\">"); 49 sp.printFile(Config.HTMLFilesPath+"/auth_footer.html"); 50 sp.printHTMLfooter(); 51 } 52 53 61 public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException , ServletException 62 { 63 doGet(request, response); 64 } 65 } 66 | Popular Tags |