conditional redirect from index.jsp
I have an index page for the application that I want to use to send the user to either the login page or the search page depending if they are logged in already. I have the following :
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC"-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@include file="/WEB-INF/jspf/taglibs.jspf" %>
<c:if test="${sessionInfo.loginProfile eq null}">
<jsp:forward page="/login.jsf" />
</c:if>
<c:if test="${sessionInfo.loginProfile ne null}">
<jsp:forward page="/search.jsf" />
</c:if>
but it uses forwards and the browser URL does not redraw. How do I do a redirect without using scriptlets in the JSP page?
Is there a way to call a method binding expression automatically upon a page being loaded? If so I could create a backing bean for the index page and then use different outcomes in the navigation rule to achieve what I want.
Thanks
Chris

