<sec:authorize ifAnyGranted="<%=dRoles%>">
<meta http-equiv="REFRESH" content="0;url=public/First.jsp">
</sec:authorize>
<sec:authorize ifAnyGranted="<%=aRoles%>">
<meta http-equiv="REFRESH" content="0;url=public/Second.jsp">
</sec:authorize>
<sec:authorize ifAnyGranted="<%=bRoles%>">
<meta http-equiv="REFRESH" content="0;url=public/Third.jsp">
</sec:authorize>
i am using spring security.
on success of login, Startup.jsp is loaded (default-target-url=”/Startup.jsp). i have above code in my Startup.jsp. i am using spring security tags. consider user has access to all above 3 jsps. The problem is , in IE7, First.jsp is loaded but in Other browsers Third.jsp is loaded.
How can i display same jsp in both the browsers?
Thanks!
I guess that you’re in a situation where a user has roles in
dRolesand also roles inbRoles, and your code thus sends two different meta refreshes to the browser.First, don’t use meta refresh, but use a real redirect or a forward (and that shouldn’t be done in a JSP, but in a controller, filter or servlet).
If you really want to stay with a JSP solution, I guess something like this should work: