package org.jboss.as.quickstarts.helloworld;

import java.io.IOException;
import java.io.PrintWriter;

import javax.inject.Inject;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * <p>
 * A simple servlet taking advantage of features added in 3.0.
 * </p>
 * 
 * <p>
 * The servlet is registered and mapped to /HelloServlet using the
 * {@linkplain WebServlet @HttpServlet}. The {@link HelloService} is injected by
 * CDI.
 * </p>
 * 
 * @author pmuir
 * 
 */
@SuppressWarnings("serial")
@WebServlet("/HelloWorld")
public class HelloWorldServlet extends HttpServlet {

	static String PAGE_HEADER = "<html><head /><body>";

	static String PAGE_FOOTER = "</body></html>";

	@Inject
	HelloService helloService;

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		PrintWriter writer = resp.getWriter();
		writer.println(PAGE_HEADER);
		writer.println("<h1>" + helloService.createHelloMessage("World")
				+ "</h1>");
		writer.println(PAGE_FOOTER);
		writer.close();
	}

}

@@ -499,19 +499,16 @@
 sing the
-%0A *
  %7B@linkp
@@ -522,16 +522,19 @@
 bServlet
+%0A *
  @HttpSe
@@ -580,19 +580,16 @@
 ected by
-%0A *
  CDI.%0A *
@@ -732,17 +732,19 @@
 vlet %7B%0A%0A
-%09
+   
 static S
@@ -788,17 +788,19 @@
 ody%3E%22;%0A%0A
-%09
+   
 static S
@@ -842,17 +842,19 @@
 %22;%0A%0A
-%09
+   
 @Inject%0A
 %09Hel
@@ -849,17 +849,19 @@
 @Inject%0A
-%09
+   
 HelloSer
@@ -880,17 +880,19 @@
 rvice;%0A%0A
-%09
+   
 @Overrid
@@ -893,17 +893,19 @@
 verride%0A
-%09
+   
 protecte
@@ -966,20 +966,17 @@
 se resp)
-%0A%09%09%09
+ 
 throws S
@@ -1006,18 +1006,22 @@
 ption %7B%0A
-%09%09
+      
 PrintWri
@@ -1051,18 +1051,22 @@
 iter();%0A
-%09%09
+      
 writer.p
@@ -1082,26 +1082,30 @@
 GE_HEADER);%0A
-%09%09
+      
 writer.print
@@ -1160,13 +1160,9 @@
 ld%22)
-%0A%09%09%09%09
+ 
 + %22%3C
@@ -1169,18 +1169,22 @@
 /h1%3E%22);%0A
-%09%09
+      
 writer.p
@@ -1208,10 +1208,14 @@
 R);%0A
-%09%09
+      
 writ
@@ -1230,9 +1230,11 @@
 ();%0A
-%09
+   
 %7D%0A%0A%7D

Fix more ws