From 6f3e6262a6d4dd54c4f04a09842dd3fb00c22cf3 Mon Sep 17 00:00:00 2001 From: Wilson Horstmeyer Bogado Date: Wed, 5 Dec 2012 15:06:14 -0200 Subject: [PATCH] =?UTF-8?q?Algumas=20corre=C3=A7=C3=B5es=20e=20complemento?= =?UTF-8?q?=20do=20XHTML?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + .../utfpr/ct/dainf/if6ae/exemplos/servlet/Modelo.java | 8 +++++--- src/main/webapp/index.jsp | 5 ++--- 3 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a6f89c2 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/target/ \ No newline at end of file diff --git a/src/main/java/utfpr/ct/dainf/if6ae/exemplos/servlet/Modelo.java b/src/main/java/utfpr/ct/dainf/if6ae/exemplos/servlet/Modelo.java index 0a6aea8..b128993 100644 --- a/src/main/java/utfpr/ct/dainf/if6ae/exemplos/servlet/Modelo.java +++ b/src/main/java/utfpr/ct/dainf/if6ae/exemplos/servlet/Modelo.java @@ -17,7 +17,7 @@ * IF6AE Desenvolvimento de Aplicaçoões Web * @author Wilson Horstmeyer Bogado */ -@WebServlet(name = "Modelo", urlPatterns = {"/modelo"}) +@WebServlet(name = "Modelo", urlPatterns = {"/modelo", "/xyz"}) public class Modelo extends HttpServlet { /** @@ -35,6 +35,8 @@ protected void processRequest(HttpServletRequest request, HttpServletResponse re response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); try { + out.println(""); out.println(""); out.println(""); out.println("Modelo de Servlet"); @@ -48,9 +50,9 @@ protected void processRequest(HttpServletRequest request, HttpServletResponse re String nome = request.getParameter("nome"); if (request.getMethod().equalsIgnoreCase("post")) { if (nome == null || nome.trim().isEmpty()) { - out.println("

Informe o nome!

"); + out.println("

Informe o nome!

"); } else { - out.println("

Olá, " + nome + "

"); + out.println("

Olá, " + nome + "

"); } } out.println(""); diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index 78df1cc..489e6ee 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -1,7 +1,6 @@ <%@page contentType="text/html" pageEncoding="UTF-8"%> - - +