Hi,
My boss and I have been trying to figure out how to import a
header file that uses session variables to authenticate the user and
send them back to the login if they lack permissions using jsp/jstl. I
believe we are using tomcat 5.5.12 and the latest version of jstl code
libraries (though I am not sure where exactly to check a version
number)

Anyways, the problem we have run into is that the redirect does not
work inside the import. I can redirect, and I can import, but i can't
do both.

test.jsp

<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
TEST PAGE


aram name="user" value="snake"/>


redirect.jsp
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
a

aram name="error" value="failure"/>

b

The other_page doesn't matter since we don't get there. Anyways, all
that ends up happening is I get a page with

TEST PAGE
a

on it. The b doesn't show up nor do I get redirected to other_page.jsp.
What I believe is happening is that the import is only capable of
returning a string of html. It processes other jsp commands like if,
forEach, or more imports, but it just returns the html generated by the
page. Since a redirect stops the rest of the page from loading, the
returned source has nothing after the redirect, but the redirect
doesn't actually run.

I have a stupid solution of using a javascript redirect instead of the
jsp but this lets the rest of the page load before the javascript runs
and kicks you to the other page. This is bad because it slows down the
user especially if the page that is going to load takes awhile to
finish generating its source. I would really like a way to use the jsp
redirect.

Thanks in advance,
Ben