Hi all,

I'm trying to do the Iframe/javascript login trick. It looks as if it's been 
proven before, but I don't know the particulars. I'm following the three steps 
outlined by Scott Battaglia as noted below. What am I doing wrong here?:



1. Create a page to do a JavaScript redirect (i.e. do a 
top.location.href=serviceUrl?ticket=ticket)
2. Create a "view" for the page in the default_views.properties
3. Modify the login-webflow.xml to reference the new view instead of the 
externalRedirect.


#1)
#make a new page called redirectView.jsp
nano ../webapps/cas/WEB-INF/view/jsp/default/ui/redirectView.jsp
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script type="text/javascript">
function redirect(){
    window.top.location.href = document.redirect.service.value;
    //window.top.location.href=serviceUrl?ticket=ticket
}
</script>
</head>
<body onload="redirect()">
    <form name="redirect" action="">
        <input type="hidden" name="service" id="service" value="${service}"/>
    </form>
</body>
</html>

#2)
#edit default_views.properties and add the following two lines to the top of 
the file
../webapps/csus.cas/WEB-INF/classes/default_views.properties

### Redirect view
redirectView.url=/WEB-INF/view/jsp/default/ui/redirectView.jsp

#3)
#edit login-webflow.xml
../webapps/csus.cas/WEB-INF/login-webflow.xml

#at the bottome of the page, change
 <end-state id="redirect" view="bean:dynamicRedirectViewSelector" />
#to
 <end-state id="redirect" view="redirectView" />
 
 
#4)
#here's the iframe page code:
<html>
<head>
<title>Testing Iframe</title>
</head>
<body>
<iframe name="devcas1_iframe" src="http://casbox/cas/login"; width=450 
height=300>
</iframe>
</body>
</html>


Thanks much,

Andy Osburn
Sacramento State
University Web Developer

-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to