Here is my question and I need help to develop Servlet,JSTL,Bean..what i am going to do is ,i am developing administrator module for Inventory Management System,in this administrator can see all users in Dropdown menu(this list is coming from database) with in a JSP, .I have written one class file for connecting database and it working properly and I stucked here.. friends please give me ideas how can i do that
srinivas miriyala wrote:then how can i use this to call from jsp
You should set the ArrayList as a scoped attribute (say request) and forward the request to the JSP using RequestDispatcher . Then you might use JSTL to iterate through the ArrayList in the JSP to create the desired HTML.
I made some changes to the code ,actually i am trying to print the arraylist but nothing it is printing and I am calling my class file from Servlet and I have written loop in my class file to dsiplay content of the arraylist
Here is the files what i have writen
adminclass1.java
Servlet-code
when i ran this file it need to diplay the users from the araylist in tomcat status window...but nothing it is printing..can somebody tell me what might be the wrong