Advertisement
Guest User

dbLogin.jsp

a guest
Apr 14th, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.21 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <jsp:root
  3. xmlns:jsp="http://java.sun.com/JSP/Page"
  4. xmlns:f="http://java.sun.com/jsf/core"
  5. xmlns:h="http://java.sun.com/jsf/html" version="2.0">
  6. <jsp:directive.page language="java"
  7. contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" />
  8. <jsp:text>
  9. <![CDATA[ <?xml version="1.0" encoding="UTF-8" ?> ]]>
  10. </jsp:text>
  11. <jsp:text>
  12. <![CDATA[ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> ]]>
  13. </jsp:text>
  14.  
  15. <html xmlns="http://www.w3.org/1999/xhtml">
  16. <head>
  17. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  18. <title>s16g38 Database Login</title>
  19.  
  20. <style>
  21. .error{color:red}
  22.  
  23. .fixed-width-input-areas{
  24. width: 175px
  25. }
  26. </style>
  27.  
  28.  
  29. </head>
  30. <body>
  31. <h3 align="center">IDS517 s16g38 Database Login</h3>
  32. <hr></hr>
  33. <br></br>
  34.  
  35. <div align="center">
  36. <a href="index.jsp">Home</a>
  37. <br></br>
  38. <br></br>
  39. <br></br>
  40. <br></br>
  41. </div>
  42. </body>
  43.  
  44. <div align="center">
  45. <f:view>
  46.  
  47. <h:form>
  48.  
  49.  
  50.  
  51. <table>
  52. <tbody>
  53. <tr>
  54. <th align="right">Username:</th>
  55. <td>
  56. <h:inputText id="username" styleClass="fixed-width-input-areas" size="20" value="#{actionBean1.dbInfo.userName}"
  57. label="Username"
  58. required="true"
  59. requiredMessage="Username is required." />
  60. <br></br>
  61. </td>
  62. <td>
  63. <h:message for="username" styleClass="error" />
  64.  
  65. </td>
  66. </tr>
  67.  
  68. <tr>
  69. <th align="right">Password:</th>
  70. <td>
  71. <h:inputSecret id="password" styleClass="fixed-width-input-areas" size="20" value="#{actionBean1.dbInfo.password}"
  72. label="Password"
  73. required="true"
  74. requiredMessage="Password is required." />
  75. <br></br>
  76. </td>
  77. <td>
  78. <h:message for="password" styleClass="error" />
  79.  
  80. </td>
  81. </tr>
  82.  
  83. <tr>
  84. <th align="right">Host:</th>
  85. <td>
  86. <h:selectOneMenu styleClass="fixed-width-input-areas" value="#{actionBean1.dbInfo.dbmsHost}">
  87. <f:selectItem itemValue="131.193.209.54" itemLabel="Server 54" />
  88. <f:selectItem itemValue="131.193.209.57" itemLabel="Server 57" />
  89. <f:selectItem itemValue="localhost" itemLabel="localhost" />
  90. </h:selectOneMenu> <br></br>
  91. </td>
  92. </tr>
  93.  
  94. <tr>
  95. <th align="right">RDBMS:</th>
  96. <td>
  97. <h:selectOneMenu styleClass="fixed-width-input-areas" value="#{actionBean1.dbInfo.dbms}">
  98. <f:selectItem itemValue="MySQL" itemLabel="MySQL" />
  99. <f:selectItem itemValue="DB2" itemLabel="DB2" />
  100. <f:selectItem itemValue="Oracle" itemLabel="Oracle" />
  101. </h:selectOneMenu>
  102. <br></br>
  103. </td>
  104. </tr>
  105.  
  106. <tr>
  107. <th align="right">dbschema:</th>
  108. <td>
  109. <h:inputText id="dbschema" styleClass="fixed-width-input-areas" size="20" value="#{actionBean1.dbInfo.dbSchema}"
  110. label="dbschema"
  111. required="true"
  112. requiredMessage="dbschema is required." />
  113. <br></br>
  114. </td>
  115. <td>
  116. <h:message for="dbschema" styleClass="error" />
  117.  
  118. </td>
  119. </tr>
  120.  
  121.  
  122.  
  123.  
  124. <tr>
  125. <td></td>
  126. <td>
  127. <br></br>
  128. <h:commandButton value="Submit" action="#{actionBean1.connect}"/>
  129. </td>
  130. </tr>
  131.  
  132. </tbody>
  133. </table>
  134. </h:form>
  135. </f:view>
  136. </div>
  137.  
  138. </html>
  139. </jsp:root>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement