selfdiagnose.jsp (example)

Define the JSP

Instead of declaring the SelfDiagnoseServlet in your Webdeployment descriptor (web.xml), you can also create a simple JSP page. If you locate this page in e.g. a folder named private then you can easily apply authorisation rules for accessing this page.
					 
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="c" prefix="c"%>
<%@page import="com.philemonworks.selfdiagnose.SelfDiagnoseServlet"%>
<%
		// remove anything already written on out
		out.clearBuffer();		
		new SelfDiagnoseServlet().run(request,response);
%>