Postingan

Menampilkan postingan dari Mei, 2015

Menambah dan Mengalikan Angka dengan servlet di java

/*  * To change this template, choose Tools | Templates  * and open the template in the editor.  */ package siregar.romauli.siregar.servlet; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /**  *  * @author toshiba  */ public class FirstServlet extends HttpServlet {     /**      * Processes requests for both HTTP      * <code>GET</code> and      * <code>POST</code> methods.      *      * @param request servlet request      * @param response servlet response      * @throws ServletException if a servlet-specific error occurs      * @throws IOException if an I/O error occurs      */     protected void processRequest(HttpServletRequest request, HttpServletResponse response, String str)             throws ServletException, IOException {         response.setCont