daily pastebin goal
78%
SHARE
TWEET

Untitled

a guest Aug 10th, 2018 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Can we write response after a return from a forwarded resource?
  2. public class MySerlvet extends GenericServlet {  
  3.  
  4. public void services(ServletRequest req, SevletResponse resp) throws ServletException, IOException {  
  5.  
  6.      resp.setBufferSize(1024);  
  7.      resp.getWrite().write("<p> Included file :</p><div>"); // clause 0
  8.      RequestDispatcher rd = req.getRequestDispatcher ("/include,txt");
  9.      rd.forward(req, resp); // clause 1
  10.      resp.getWriter().write(</div>"); // clause 2
  11.  
  12.      }
  13.  
  14. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top