Created
September 21, 2013 15:01
-
-
Save mraad/6651405 to your computer and use it in GitHub Desktop.
Log Web Servlet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@WebServlet(urlPatterns = "/log/*", loadOnStartup = 1) | |
public class LogServlet extends HttpServlet | |
{ | |
@Override | |
protected void doGet( | |
final HttpServletRequest req, | |
final HttpServletResponse res) throws ServletException, IOException | |
{ | |
/** | |
* Do some logic here to handle web requests | |
*/ | |
req.setAttribute("qs", req.getQueryString()); | |
req.getRequestDispatcher("/index.jsp").forward(req, res); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment