<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>We have three kind of users, regular user log in through shibboleth, and moodle admin/guest will be just direct to moodle website for them to log in. <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I am thinking weather the login page can see which website the user is logged in, then display different form based on the source. Do you think following code will work?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>StorageService storageService = HttpServletHelper.getStorageService(application);<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>LoginContext loginContext = HttpServletHelper.getLoginContext(storageService,application, request);<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>String entityId = loginContext.getRelyingPartyId();<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>if (loginContext.getRelyingPartyId().equals("http://moodle.net")){<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>then display a different html form here<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>else{<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>the default html login form here<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Holly Wang, IT Department CSUN, 818-677-2031<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> users-bounces@shibboleth.net [mailto:users-bounces@shibboleth.net] <b>On Behalf Of </b>Karla Borecky<br><b>Sent:</b> Tuesday, April 17, 2012 10:14 AM<br><b>To:</b> Shib Users<br><b>Subject:</b> Re: any advice on how to modify the login.jsp page?<o:p></o:p></span></p></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'>Holly, could you possibly branch the behavior based on an attribute (after the authentication)? or is this something that has to happen to actually process the login in different ways?<o:p></o:p></p><div><p class=MsoNormal>On Mon, Apr 16, 2012 at 4:31 PM, Wang, Holly <<a href="mailto:holly.wang@csun.edu">holly.wang@csun.edu</a>> wrote:<o:p></o:p></p><p class=MsoNormal>Hi,<br><br>I am asked to modify shib login.jsp page so the form with take multiple submit command. Depending on the submit button value, we send the form to different places.<br><br>I did some testing, tried to add a new jsp page to handle it. But I can't find a place to define the servlet definition for the new jsp page.<br><br>Does anyone has an example on the login.jsp which takes multiple submit commend?<br><br>Current login.jsp form:<br><br><form action="j_security_check" method="post" autocomplete="off"><br><input type="text" id="uid" name="j_username" style="width:100px" value=""/><br><input type="password" name="j_password" style="width:100px"/><br><input type="submit" value="Login" /><br></form><br><br><br>We want it to be like following, but action lead to different places per the submit value:<br><br><form action=" " method="post" autocomplete="off"><br><input type="text" id="uid" name="j_username" style="width:100px" value=""/><br><input type="password" name="j_password" style="width:100px"/><br><input type="submit" value="Login" /><br><input value="moodleadmin" type="submit" name="moodleadmin" id="moodleadmin"><br></form><br><br>thanks<br><br>Holly Wang, IT Department CSUN, <a href="tel:818-677-2031">818-677-2031</a><br><br>--<br>To unsubscribe from this list send an email to <a href="mailto:users-unsubscribe@shibboleth.net">users-unsubscribe@shibboleth.net</a><o:p></o:p></p></div><p class=MsoNormal><br><br clear=all><o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal>-- <o:p></o:p></p><div style='margin-left:30.0pt'><p class=MsoNormal>Karla Borecky<br>Systems Administrator<br>ITS<br>Smith College<br>Northampton, MA 01063<o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p></div></body></html>