Yes it should be failing. You cannot set headers or issue redirects from an include. (Its a rule in the spec)

-Tim

Jon Beyer wrote:
The code 'response.sendRedirect( "http://www.yahoo.com"; )' fails when the containing jsp is included from another jsp. Should this be failing? What am I doing wrong? By 'failing', I mean that there is no exception thrown, and no error message, but simply no redirect.

e.g. (the redirect works properly when foo.jsp is called directly, but fails when foo2.jsp is called):

foo2.jsp
------------

<%@ page language="java" import="java.lang.*,java.util.*" %>
<%@ include file="foo.jsp" %>

foo.jsp
------------

<%@ page language="java" import="java.lang.*,java.util.*" %>
<%
  response.sendRedirect( "http://www.yahoo.com"; );
%>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to