B
Ben Jessel
This is a kind of workaround - have a link that sends you to the login
page;
On the front page:
Already a member? Click <a
href="<%=request.getContextPath()%>"/protected_redirector.jsp?j_forward=<%=request.getContextPath()
+ "/index.jsp"%>">here</a> to login.
protected_redirector.jsp - this page should be in the protected realm
via web.xml.
<web-resource-name>Members Area</web-resource-name>
<!-- Define the context-relative URL(s) to be protected -->
<url-pattern>/login.jsp</url-pattern>
<url-pattern>/protected_redirector.jsp</url-pattern>
</web-resource-collection>
-------------------
<%
String j_forward = request.getParameter("j_forward");
if ( ( j_forward==null ) || ( j_forward.trim().length()==0 ) )
j_forward = request.getContextPath() + "/index.jsp";
response.sendRedirect( j_forward );
%>
-----------------------
page;
On the front page:
Already a member? Click <a
href="<%=request.getContextPath()%>"/protected_redirector.jsp?j_forward=<%=request.getContextPath()
+ "/index.jsp"%>">here</a> to login.
protected_redirector.jsp - this page should be in the protected realm
via web.xml.
<web-resource-name>Members Area</web-resource-name>
<!-- Define the context-relative URL(s) to be protected -->
<url-pattern>/login.jsp</url-pattern>
<url-pattern>/protected_redirector.jsp</url-pattern>
</web-resource-collection>
-------------------
<%
String j_forward = request.getParameter("j_forward");
if ( ( j_forward==null ) || ( j_forward.trim().length()==0 ) )
j_forward = request.getContextPath() + "/index.jsp";
response.sendRedirect( j_forward );
%>
-----------------------