@@ -0,0 +1,1691 @@
+package br.com.meslin.calculadora;%0A%0Aimport java.io.IOException;%0Aimport javax.servlet.ServletException;%0Aimport javax.servlet.annotation.WebServlet;%0Aimport javax.servlet.http.HttpServlet;%0Aimport javax.servlet.http.HttpServletRequest;%0Aimport javax.servlet.http.HttpServletResponse;%0A%0A/**%0A * Servlet implementation class Calcula%0A */%0A@WebServlet(%0A%09%09description = %22Calcula as 4 opera%C3%A7%C3%B5es%22,%0A%09%09urlPatterns = %7B %22/calculadora/Calcula%22 %7D)%0Apublic class Calcula extends HttpServlet %7B%0A%09private static final long serialVersionUID = 1L;%0A       %0A    /**%0A     * @see HttpServlet#HttpServlet()%0A     */%0A    public Calcula() %7B%0A        super();%0A        // TODO Auto-generated constructor stub%0A    %7D%0A%0A%09/**%0A%09 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)%0A%09 */%0A%09protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException %7B%0A%09%09// obter dados%0A%09%09String s0p1 = request.getParameter(%22operando1%22);%0A%09%09String s0p2 = request.getParameter(%22operando2%22);%0A%09%09String operacao = request.getParameter(%22operacao%22);%0A%09%09%0A%09%09// processar dados%0A%09%09double operando1 = Double.parseDouble(s0p1);%0A%09%09double operando2 = Double.parseDouble(s0p1);%0A%09%09double resultado = 0;%0A%09%09%0A%09%09if(operacao.equals(%22+%22)) %7B%0A%09%09%09resultado = operando1 + operando2;%0A%09%09%7D else if(operacao.equals(%22-%22)) %7B%0A%09%09%09resultado = operando1 - operando2;%0A%09%09%7D else if(operacao.equals(%22/%22)) %7B%0A%09%09%09resultado = operando1 / operando2;%0A%09%09%7D else if(operacao.equals(%22x%22)) %7B%0A%09%09%09resultado = operando1 * operando2;%0A%09%09%7D%0A%09%09%0A%09%09// encaminhar resultados para o visual%0A%09%09request.setAttribute(%22resultado%22, new Double(resultado));%0A%09%09request.getRequestDispatcher(%22resultado.jsp%22).forward(request, response);%0A%09%09%0A%09%7D%0A%0A%7D%0A

Create Calcula.java