Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%@ page language="java" contentType="text/html; charset=ISO-8859-1" import = "java.util.*" pageEncoding="ISO-8859-1"%>
- <!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <link rel="stylesheet" href="jquery chosen utils/chosen.css">
- <link rel="stylesheet" type="text/css" href="jquery chosen utils/welcomestyle.css">
- </head>
- <body>
- <div align = center>
- <table style="width: 100%">
- <tr>
- <th> Script Name </th>
- <th> Main Action Keywords </th>
- <th> Sub Action Keywords </th>
- </tr>
- </table>
- <%
- for(int i =0; i<5;i++)
- {
- %>
- <form action = "Testing">
- <table style="width: 100%">
- <tr>
- <td> Test <%= i %> </td>
- <td>
- <div>
- <select name = "Actions" class = "Actions" >
- <%
- for(int j=0;j<4;j++)
- {
- %>
- <option value="Action<%= j %>">
- Action <%= j %>
- </option>
- <%
- }
- %>
- </select>
- </div>
- </td>
- <td>
- <select name = "SubActions" class = "SubActions" multiple>
- <%
- for(int k=0;k<4;k++)
- {
- %>
- <option value="SubAction<%= k %>">
- Sub Action <%= k %>
- </option>
- <%
- }
- %>
- </select>
- </td>
- </tr>
- </table>
- <%
- }
- %>
- <br><br>
- <input type = submit value = "Submit" name ="submit" />
- </form>
- </div>
- </body>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>
- <script src="jquery chosen utils/chosen.jquery.js" type="text/javascript"></script>
- <script src="jquery chosen utils/prism.js" type="text/javascript" charset="utf-8"></script>
- <script type="text/javascript">
- $(document).ready(function(){
- $(".Actions").chosen({
- width: "75%"
- });
- $(".SubActions").chosen({
- width: "75%"
- });
- });
- </script>
- </html>
- import java.io.IOException;
- import java.util.ArrayList;
- import javax.servlet.ServletException;
- import javax.servlet.annotation.WebServlet;
- import javax.servlet.http.HttpServlet;
- import javax.servlet.http.HttpServletRequest;
- import javax.servlet.http.HttpServletResponse;
- @WebServlet("/Testing")
- public class Testing extends HttpServlet
- {
- private static final long serialVersionUID = 1L;
- protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
- {
- String a = request.getParameter("Actions"); //Should get actions corrsponding to each test
- String b = request.getParameter("SubActions"); //Should get subactions corrsponding to each test
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement