Graham Farrell wrote:As I understand it the controller for the JSP would be it's servlet class, would this be correct?
My knowledge is limited currently I have only doPost and doGet methods within the servlet which I believe are utilized when the JSP form is submitted.
Currently I've added the following to my servlet
Would this be correct?
ArrayList<County> counties = CountyDB.selectCounties();
HttpSession session = request.getSession();
RequestDispatcher dispatch = getServletContext().getRequestDispatcher(url);
RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(hurl);
Within the JSP I have the following code however the select list is not populated.
Graham Farrell wrote:When the app loads the index file (at the moment) is add_user.jsp
Would it be an option to import the CountyDB class as a bean into the add_user page?
My apologies my next reply will be late as I'm in work at 4am so will reply as soon as possible.
Graham Farrell wrote:I have this working now ...
In relation to the location of my jsp files I'm following the layout of the book (a poor one I'm beginning to think) that I'm using to teach myself so all my JSPs are within the Web Content folder not the WEB-INF folder.
Anyway I edited my servlet to include a doGet method as follows
If you're interested in nit-picking:
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koophttps://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton