package com.github.sbugat.samplewebapp;

import java.io.IOException;

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

/**
 * Sample class of a web-app servlet
 * 
 * @author Sylvain Bugat
 */
@WebServlet("/redirect")
public class SampleWebapp extends HttpServlet {

	private static final long serialVersionUID = 1997452078400181160L;

	@Override
	protected void doGet(final HttpServletRequest httpServletRequest, final HttpServletResponse httpServletResponse) throws ServletException, IOException {

		System.out.println("SampleWebapp class: doGet method called on:" + httpServletRequest.getRequestURI());
		httpServletRequest.setAttribute("requestedURI", httpServletRequest.getRequestURI());
		// Redirect all get request to index.jsp page
		httpServletRequest.getRequestDispatcher("/index.html").forward(httpServletRequest, httpServletResponse);
	}
}

@@ -769,16 +769,276 @@
 I());%0A%09%09
+String argumentValue = httpServletRequest.getParameter(%22argument%22);%0A%09%09if (null == argumentValue %7C%7C argumentValue.isEmpty()) %7B%0A%09%09%09argumentValue = %22redirect%22;%0A%09%09%7D%0A%0A%09%09// Forward all get request to test-el.jsp page with the argument value or redirect by default%0A%09%09
 httpServ
@@ -1117,56 +1117,8 @@
 ());
-%0A%09%09// Redirect all get request to index.jsp page
 %0A%09%09h
@@ -1162,19 +1162,46 @@
 r(%22/
-index.html%22
+test-el.jsp?argument=%22 + argumentValue
 ).fo

Change sample webapp