• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Qn on page buffer

 
Chandrakanth
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it legal to have a JSP like this,
i mean can we set a buffer to none and fwd to a jsp

<%@ page buffer="none" %>
<html>
<head><title>Test of jsp:forward</title>
</head>
<body>
Start
asdfsadf

<jsp:forward page="TestJsp3.jsp" />
</body>
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

It will throw IllegalStateException. Before the forward the container will try to clear the buffer. The buffer size is zero, so it is illegal as the contents are already written to the writer.

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic