Created
December 2, 2013 10:21
-
-
Save rominirani/7747582 to your computer and use it in GitHub Desktop.
Signature Capture : SignatureCaptureService.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mindstorm.signaturecapture.services; | |
import java.io.IOException; | |
import java.util.logging.Logger; | |
import javax.servlet.http.*; | |
import com.mindstorm.signaturecapture.dao.SignatureRecordDAO; | |
import com.mindstorm.signaturecapture.utils.AppException; | |
@SuppressWarnings("serial") | |
public class SignatureCaptureService extends HttpServlet { | |
public static final Logger _logger = Logger.getLogger(SignatureCaptureService.class.getName()); | |
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { | |
_logger.info("GET not supported"); | |
} | |
public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException { | |
String receiverName = req.getParameter("receiverName"); | |
String signature = req.getParameter("signature"); | |
//Do some validation here, but we will leave this for now | |
SignatureRecordDAO.INSTANCE.add(receiverName, signature); | |
resp.sendRedirect("list.jsp"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment