FileDocCategorySizeDatePackage
Sender.javaAPI DocExample987Fri Apr 18 10:16:38 BST 2003com.jspservletcookbook

Sender

public class Sender extends HttpServlet

Fields Summary
Constructors Summary
Methods Summary
public voiddoGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)


    doPost(request,response);
public voiddoPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)


/* if the servlet tries to access a resource and finds out that the client is not authorized to access it - "401 Unauthorized" */
        response.sendError(401,"You are not authorized to view the requested component");

  /* if the servlet tries to access a resource that is forbidden for this client and there is no further information on it - "403 Forbidden" */
        //response.sendError(403);

/* if the servlet tries to access a resource that is not found given the client's provided URL - "404 Not Found" */
        //response.sendError(404);