01 package interval;
02
03 import javax.servlet.*;
04 import javax.servlet.http.*;
05 import java.io.*;
06 import java.util.*;
07
08 public class ErrorServlet extends HttpServlet {
09 private static final String CONTENT_TYPE = "text/html; charset=windows-1250";
10
11 public void init() throws ServletException {
12 }
13
14 public void doGet(HttpServletRequest request, HttpServletResponse response)
15 throws ServletException, IOException {
16 response.setContentType(CONTENT_TYPE);
17 PrintWriter out = response.getWriter();
18 out.println("<html>");
19 out.println("<head><title>ErrorServlet</title></head>");
20 out.println("<body>");
21 out.println("<p>Sorry ale priamy prístup k servletu interval.TimeServlet je zakázaný</p>");
22 out.println("<p>Použite prosím tento <a href='../timeservlet'>odkaz</a></p>");
23 out.println("</body></html>");
24 }
25
26 public void destroy() {
27 }
28 }
|