HF Servlets & JSP, page: 405 (first paragraph after the slide on the left side)It says....
There are a few limitations, though:an included page CANNOT change the response status code or set headers(which means it can't call, say, addCookies()). You won't get an error if the included JSP tries to do things it can't - you just won't get what you asked for.
Can somebody explain why I cannot change the response status or set headers in the included JSP?
posted 11 years ago
Hi Vishwa, you cannot do that because the servlet/jsp that include another page will override what you make on the header with its header. Trully talking you can do this, but it will not work.