FileDocCategorySizeDatePackage
ShowFile.javaAPI DocExample1035Mon May 05 14:58:04 BST 2003com.jspservletcookbook

ShowFile

public class ShowFile extends HttpServlet

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

	
	  ServletOutputStream out = response.getOutputStream();
	  String fileName = request.getParameter("file");
      
        out.println("<html>");
        out.println("<head>");
        out.println("<title>Welcome</title>");  
        out.println("</head>");
        out.println("<body>");
        out.println("<h2>The File</h2>");
        out.println(fileName);
        out.println("</body>");
        out.println("</html>");
        out.close();
    
    
public voiddoPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)

        
        doGet(request,response);