package com.transcend.compute.servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.msi.tough.core.Appctx;

public class ComputeServlet extends HttpServlet {
	private final Logger logger = LoggerFactory.getLogger(this.getClass()
			.getName());
	private static final long serialVersionUID = 1L;

	/**
	 * Process the GET request
	 *
	 * @param HttpServletRequest
	 * @param HttpServletRespinse
	 */
	@Override
	protected void doGet(final HttpServletRequest req,
			final HttpServletResponse resp) throws ServletException,
			IOException {
		logger.debug("Into doGet");
		doPost(req, resp);
	}

	/**
	 * Process doPost request
	 *
	 * @param HttpServletRequest
	 * @param HttpServletRespinse
	 */
	@Override
	protected void doPost(final HttpServletRequest req,
			final HttpServletResponse resp) throws ServletException,
			IOException {
	       try {
	            final ComputeServiceImpl impl = Appctx.getBean("computeService");
	            impl.process(req, resp);
	        } catch (final Exception e) {
	            e.printStackTrace();
	        }
	}
}

@@ -377,17 +377,20 @@
 rvlet %7B%0A
-%09
+    
 private 
@@ -451,19 +451,28 @@
 Class()%0A
-%09%09%09
+            
 .getName
@@ -476,17 +476,20 @@
 ame());%0A
-%09
+    
 private 
@@ -530,22 +530,28 @@
  = 1L;%0A%0A
-%09/**%0A%09
+    /**%0A    
  * Proce
@@ -561,37 +561,43 @@
 the GET request%0A
-%09 *%0A%09
+     *%0A    
  * @param HttpSe
@@ -601,33 +601,36 @@
 pServletRequest%0A
-%09
+    
  * @param HttpSe
@@ -635,38 +635,44 @@
 ServletRespinse%0A
-%09 */%0A%09
+     */%0A    
 @Override%0A%09prote
@@ -657,33 +657,36 @@
 /%0A    @Override%0A
-%09
+    
 protected void d
@@ -712,35 +712,44 @@
 letRequest req,%0A
-%09%09%09
+            
 final HttpServle
@@ -781,35 +781,44 @@
 rvletException,%0A
-%09%09%09
+            
 IOException %7B%0A%09%09
@@ -815,18 +815,24 @@
 ption %7B%0A
-%09%09
+        
 logger.d
@@ -851,18 +851,24 @@
 oGet%22);%0A
-%09%09
+        
 doPost(r
@@ -882,18 +882,27 @@
 p);%0A
-%09%7D%0A%0A%09/**%0A%09
+    %7D%0A%0A    /**%0A    
  * P
@@ -927,13 +927,19 @@
 est%0A
-%09 *%0A%09
+     *%0A    
  * @
@@ -963,17 +963,20 @@
 Request%0A
-%09
+    
  * @para
@@ -1001,14 +1001,20 @@
 nse%0A
-%09 */%0A%09
+     */%0A    
 @Ove
@@ -1019,17 +1019,20 @@
 verride%0A
-%09
+    
 protecte
@@ -1075,19 +1075,28 @@
 st req,%0A
-%09%09%09
+            
 final Ht
@@ -1148,11 +1148,20 @@
 on,%0A
-%09%09%09
+            
 IOEx
@@ -1170,17 +1170,17 @@
 ption %7B%0A
-%09
+ 
        t
@@ -1184,17 +1184,16 @@
   try %7B%0A
-%09
         
@@ -1262,17 +1262,16 @@
 vice%22);%0A
-%09
         
@@ -1299,17 +1299,16 @@
  resp);%0A
-%09
         
@@ -1337,17 +1337,16 @@
 on e) %7B%0A
-%09
         
@@ -1370,17 +1370,16 @@
 race();%0A
-%09
         
@@ -1384,9 +1384,12 @@
   %7D%0A
-%09
+    
 %7D%0A%7D%0A

Reformat source.