Question concerning login.jsp
Brewer, Edward L
lee.brewer at Vanderbilt.Edu
Mon Apr 29 10:20:46 EDT 2013
>>
>>Actually the login-mobile.jsp does have the correct bits. To prove
>>that to myself, I replaced login-mobile.jsp with login.jsp (minus the
>>javascript that checks for screen size that we added). Tested and get
>>similar error... Now I see the cookies but it still fails with no
>>errors listed.
>The problem is your redirect, that's not compatible with the code. The actionUrl attribute thingy is set internally in the servlet when it forwards to login.jsp. That's not a redirect, it's a forward. Your redirect doesn't cause it to get set, so it tries to post back >to j_security_check.
>You might make it work by just hardwiring the action location to post back to the servlet.
-- Scott
Scott,
Thanks, that was the ticket. Here is the solution to our problem
In the login.jsp we included this javascript
<script type="text/javascript">
<!--
var temp = "<%=request.getAttribute("actionUrl")%>";
if (screen.width <= 700) {
window.location = "https://vushib-idp-test.vanderbilt.edu/idp/login-mobile.jsp?actionUrl="+temp;
}
//-->
</script>
In the login-mobile.jsp
<% if(request.getParameter("actionUrl") != null){ %>
<form action="<%=request.getParameter("actionUrl")%>" method="post">
<% }else{ %>
<form action="j_security_check" method="post">
<% } %>
It seems to be working now.
Thanks again,
Lee Brewer
More information about the users
mailing list