@@ -0,0 +1,1822 @@
+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 Calcula2%0A */%0A@WebServlet(%22/Calcula2%22)%0Apublic class Calcula2 extends HttpServlet %7B%0A%09private static final long serialVersionUID = 1L;%0A       %0A    /**%0A     * @see HttpServlet#HttpServlet()%0A     */%0A    public Calcula2() %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 else %7B%0A%09%09%09// ERRO!!!%0A%09%09%09request.setAttribute(%22tipoErro%22, %22(Calcula2 informa)operacao invalida%22);%0A%09%09%09request.getRequestDispatcher(%22../erros/erro.jsp%22).forward(request, response);%0A%09%09%09return;%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(%22calculadora/resultado.jsp%22).forward(request, response);%0A%09%7D%0A%0A%7D%0A

Create Calcula2.java