The following 3.0 login.jsp file has been modified to display line numbers. The lines that require modifications have been highlighted, and a few extra spaces have been added to allow for a better display of the text. For a description of the modifications that need to be made, see Section 9.2.4, Modifying 3.0 Login Pages for 3.1 SP2.
1. <%@ page language="java" %> 2. <%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> 3. <%@ page import="com.novell.nidp.common.provider.*" %> 4. <%@ page import="java.util.*" %> 5. <%@ page import="java.net.*" %> 6. <%@ page import="com.novell.nidp.*" %> 7. <%@ page import="com.novell.nidp.servlets.*" %> 8. <%@ page import="com.novell.nidp.resource.*" %> 9. <%@ page import="com.novell.nidp.resource.jsp.*" %> 10.<%@ page import="com.novell.nidp.common.xml.w3c.*" %> 11.<% 12. response.setHeader("Pragma", "No-cache"); 13. response.setHeader("Cache-Control", "no-cache"); 14. 15. Locale locale = request.getLocale(); 16. String strLanguageCode = locale.getLanguage(); 17. String strImageDirectory = NIDPResourceManager.getInstance().getImage Directory(locale); 18. NIDPResource resource = NIDPResourceManager.getInstance().get (JSPResDesc.getInstance(), locale); 19.%> 20. 21.<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//<%=strLanguage Code%>"> 22.<html lang="<%=strLanguageCode%>"> 23. <head> 24. <link rel="stylesheet" href="<%= request.getContextPath() %>/images/hf_style.css" type="text/css"> 25. <style type="text/css" media="screen"><!-- 26. #headimage { position: relative; top: 0px; left: 0px; z-index: 1} 27. #title { position: relative; top: 40px; left: 5px; color: white; z-index: 4} 28. #locallabel { position: relative; top: 78px; left: 10px; z-index: 4} 29. #login { text-align: center } 30. --></style> 31. <META HTTP-EQUIV="Content-Language" CONTENT="<%=strLanguageCode%>"> 32. <title><%=resource.getString0(JSPResDesc.LOGIN_TITLE)%></title> 33. <meta http-equiv="content-type" content="text/html;charset=utf-8"> 34. <script type="text/javascript" src="<%= request.getContextPath() %>/images/showhide_2.js"></script> 35. <script language="JavaScript"> 36.
37. var i = 0;
38. function imageSubmit()
39. {
40. if (i == 0)
41. {
42. i = 1;
43. document.IDPLogin.submit();
44. }
45.
46. return false;
47. }
48. </script>
49. </head>
50. <body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" rightmargin="0" onLoad="document.IDPLogin.Ecom_User_ID.focus();" >
51. <form name="IDPLogin" enctype="application/x-www-form-urlencoded" method="POST" action="<%= (String) request.getAttribute("url") %>" AUTOCOMPLETE="off">
52. <table style="margin-top: 6em" width="100%" border="0" cellspacing="0" cellpadding="0">
53. <tr>
54. <td width="50%" height="80 px"> </td>
55. <td colspan="2">
56. <div id="title"><b><%=resource.getString0(JSPResDesc. LOGIN_TITLE)%></b></div>
57. <div id="locallabel"><b><%=resource.getString0(JSPResDesc. LOCAL_LOGIN)%></b></div>
58. <div id="headimage"><img src="<%= request.getContextPath() %>/images/Odyssey_LoginHead.gif" alt="" height="80" width="550" border="0"></div>
59. </td>
60. <td width="100%"> </td>
61. </tr>
62. <tr>
63. <td width="50%"> </td>
64. <td style="background-color: #efeee9; padding: 10px" colspan="2">
65.<%
66. String err = (String) request.getAttribute(NIDPConstants.ATTR _LOGIN_ERROR);
67. if (err != null)
68. {
69. %>
70. <div><label><%=err%></label></div>
71. <% }
72.
73 // Determine if this login page is being used for account identification
74. // purposes
75. String id = (String) request.getAttribute("identify");
76. if (id != null && id.equals("true"))
77. {
78. %>
79. <div><%=resource.getString0(JSPResDesc.IDENTIFY)%></div>
80. <% } %>
81. <span id="login2" style="display: block;">
82. <table>
83. <tr>
84. <td nowrap="nowrap">
85. <div>
86. <label style="width: 100px"><%=resource.getString0 (JSPResDesc.USERNAME)%></label></label>
87. </div>
88. </td>
89. <td width="100%" nowrap="nowrap">
90. <div>
91. <input type="text" class="smalltext" name="Ecom_User_ID" size="30">
92. </div>
93. </td>
94. </tr>
95. <tr>
96. <td nowrap="nowrap">
97. <div>
98. <label><%=resource.getString0(JSPResDesc.PASSWORD)%></label>
99. </div>
100. </td>
101. <td style="white-space: nowrap">
102. <div>
103. <input type="password" class="smalltext" name="Ecom_ Password" size="30">
104. <input alt="<%=resource.getString0(JSPResDesc.LOGIN)%>" border="0" name="loginButton2" src="<%= request.getContextPath() %>/images/<%=strImageDirectory%>/btnlogin_<%=strImageDirectory%>.gif" type="image" value="Login" onClick="return imageSubmit()">
105. </div>
106. </td>
107. </tr>
108.<%
109. String prov = (String) request.getAttribute("provision");
110. if (prov != null)
111. {
112.%>
113. <tr>
114. <td colspan=2>
115. <div>
116. <label><a href="<%=prov%>"><%=resource.getString0 (JSPResDesc.CREATE_ACCT)%></a></label>
117. </div>
118. </td>
119. </tr>
120.<% } %>
121. </table>
122. </span>
123. </td>
124. <td width="100%"> </td>
125. </tr>
126. <%
127. DisplayableProvider[] list = (DisplayableProvider[]) request.get Attribute("providers");
128. if (list != null && list.length > 0)
129. {
130.%>
131. <tr>
132. <td width="50%"></td>
133. <td style="background-color: #efeeec; padding-left: 10px; padding-bottom: 10px"colspan="2">
134. <div style="margin-left: -10px; background: url(<%= request.getContextPath() %>/images/dotline_bg.gif) repeat-x"> </div>
135. <div><b><%=resource.getString0(JSPResDesc.FEDERATED_LOGIN)%></b></div>
136.<%
137. for (int i = 0; i < list.length; i++)
138. {
139.%>
140. <a style="padding: 5px" href="<%=list[i].getAuthenticationUrl (request.getContextPath())%>">
141.<%
142. if (list[i].hasIcon())
143. {
144.%>
145. <img border=0 class="margin4" alt="<%=XMLUtil.stringToHTML String(list[i].getDisplayName())%>" src="<%=XMLUtil.stringToHTMLString (list[i].getIcon(request))%>" align="absmiddle"></a>
146.<%
147. }
148. else
149. {
150.%>
151. <%=XMLUtil.stringToHTMLString(list[i].getDisplayName())%></a>
152.<%
153. }
154.
155. } %>
156. </td>
157. <td width="100%"></td>
158. </tr>
159.<% } %>
160. <tr>
161. <td width="50%"></td>
162. <td style="background-color: #E6D88C; padding-left: 10px"><img style="padding-right: 200px" src="<%= request.getContextPath() %>/images/LAP_interoperable_logo_100.gif" align="absmiddle" border="0"></td>
163. <td style="background-color: #E6D88C; padding-right: 10px" align="right" width="100">
164.
165.<%
166. String cancel = (String) request.getAttribute("cancel");
167. if (cancel != null)
168. {
169.%>
170. <input alt="<%=resource.getString0(JSPResDesc. CANCEL)%>" border="0" name="Cancel" src="<%= request.getContextPath() %>/images/<%=strImageDirectory%>/btncancel_<%=strImageDirectory%>.gif" type="image" value="Cancel" tabindex="4">
171.<% }
172. else
173. {
174.%>
175.
176.<% } %>
177. </td>
178. <td width="100%"></td>
179. </tr>
180.<%
181. if (NIDPCripple.isCripple())
182. {
183.%>
184. <tr>
185. <td colspan=4 width="100%" align="center"><%=NIDPCripple. getCrippleAdvertisement(locale)%></td>
186. </tr>
187.<%
188. }
189.%>
190. </table>
191. </form>
192. </body>
193.</html>