Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.54 KB | None | 0 0
  1. <%@ page language="java" contentType="text/html; charset=ISO-8859-1" import = "java.util.*" pageEncoding="ISO-8859-1"%>
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  6.  
  7. <link rel="stylesheet" href="jquery chosen utils/chosen.css">
  8. <link rel="stylesheet" type="text/css" href="jquery chosen utils/welcomestyle.css">
  9. </head>
  10. <body>
  11. <div align = center>
  12. <table style="width: 100%">
  13. <tr>
  14. <th> Script Name </th>
  15. <th> Main Action Keywords </th>
  16. <th> Sub Action Keywords </th>
  17. </tr>
  18. </table>
  19. <%
  20. for(int i =0; i<5;i++)
  21. {
  22. %>
  23. <form action = "Testing">
  24. <table style="width: 100%">
  25. <tr>
  26. <td> Test <%= i %> </td>
  27. <td>
  28. <div>
  29. <select name = "Actions" class = "Actions" >
  30. <%
  31. for(int j=0;j<4;j++)
  32. {
  33. %>
  34. <option value="Action<%= j %>">
  35. Action <%= j %>
  36. </option>
  37. <%
  38. }
  39. %>
  40. </select>
  41. </div>
  42. </td>
  43. <td>
  44. <select name = "SubActions" class = "SubActions" multiple>
  45. <%
  46. for(int k=0;k<4;k++)
  47. {
  48. %>
  49. <option value="SubAction<%= k %>">
  50. Sub Action <%= k %>
  51. </option>
  52. <%
  53. }
  54. %>
  55. </select>
  56. </td>
  57. </tr>
  58. </table>
  59. <%
  60. }
  61. %>
  62. <br><br>
  63. <input type = submit value = "Submit" name ="submit" />
  64. </form>
  65. </div>
  66. </body>
  67. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>
  68. <script src="jquery chosen utils/chosen.jquery.js" type="text/javascript"></script>
  69. <script src="jquery chosen utils/prism.js" type="text/javascript" charset="utf-8"></script>
  70. <script type="text/javascript">
  71. $(document).ready(function(){
  72. $(".Actions").chosen({
  73. width: "75%"
  74. });
  75. $(".SubActions").chosen({
  76. width: "75%"
  77. });
  78. });
  79. </script>
  80. </html>
  81.  
  82. import java.io.IOException;
  83. import java.util.ArrayList;
  84. import javax.servlet.ServletException;
  85. import javax.servlet.annotation.WebServlet;
  86. import javax.servlet.http.HttpServlet;
  87. import javax.servlet.http.HttpServletRequest;
  88. import javax.servlet.http.HttpServletResponse;
  89.  
  90. @WebServlet("/Testing")
  91. public class Testing extends HttpServlet
  92. {
  93.  
  94. private static final long serialVersionUID = 1L;
  95.  
  96. protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
  97. {
  98.  
  99.  
  100. String a = request.getParameter("Actions"); //Should get actions corrsponding to each test
  101. String b = request.getParameter("SubActions"); //Should get subactions corrsponding to each test
  102.  
  103.  
  104. }
  105. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement