diff --git a/src/web/Director.java b/src/web/Director.java index bacea9d8bcb85ca7b28fae8b14527e03a0f7b258..cbb60b4483970ac18ab3090fc85f7cc9be67459e 100755 --- a/src/web/Director.java +++ b/src/web/Director.java @@ -34,6 +34,8 @@ public class Director extends HttpServlet { TrawlExpert te = (TrawlExpert)request.getServletContext().getAttribute("trawl"); //find all applicable things underneath the top most one, need API for this + //result = te.getPhylum(); // SOmething like this + //send lists of things to build the dropdowns request.setAttribute("phylum", result); request.setAttribute("bioClass", result); @@ -51,4 +53,31 @@ public class Director extends HttpServlet { String[] s = url.split("/"); return s[s.length - 1]; } + + + private void doChangedPhyum(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + //get answers from form + String phylum = request.getParameter("phylum"); + String bioClass = request.getParameter("class"); + String order = request.getParameter("order"); + String family = request.getParameter("family"); + String genus = request.getParameter("genus"); + String species = request.getParameter("species"); + + TrawlExpert te = (TrawlExpert)request.getServletContext().getAttribute("trawl"); + //find all applicable things underneath the top most one, need API for this + + //result = te.getPhylum(); // SOmething like this + + //send lists of things to build the dropdowns + request.setAttribute("phylum", result); + request.setAttribute("bioClass", result); + request.setAttribute("order", result); + request.setAttribute("family", result); + request.setAttribute("genus", result); + request.setAttribute("species", result); + //send back the index.jsp page + RequestDispatcher view = request.getRequestDispatcher("index.jsp"); + view.forward(request, response); + } } \ No newline at end of file