| Author |
JSTL+Servlet+beans
|
Vas Miriyala
Ranch Hand
Joined: Sep 14, 2009
Posts: 114
|
|
|
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
|
 |
Vijitha Kumara
Bartender
Joined: Mar 24, 2008
Posts: 3670
|
|
srinivas miriyala wrote:.... I have written one class file for connecting database and it working properly and I stucked here..
Where? In JSTL?
|
SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
|
 |
Vas Miriyala
Ranch Hand
Joined: Sep 14, 2009
Posts: 114
|
|
No saperate...these are my codes
Database1.java
and Method I have written is
and I have written servlet also comboboxServlet.java
then how can i use this to call from jsp
|
 |
Vijitha Kumara
Bartender
Joined: Mar 24, 2008
Posts: 3670
|
|
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.
|
 |
Vas Miriyala
Ranch Hand
Joined: Sep 14, 2009
Posts: 114
|
|
|
okay let me try with that and i will let you know what happen anyway thanks for the reply
|
 |
Vas Miriyala
Ranch Hand
Joined: Sep 14, 2009
Posts: 114
|
|
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
|
 |
Vijitha Kumara
Bartender
Joined: Mar 24, 2008
Posts: 3670
|
|
srinivas miriyala wrote:.. when i ran this file it need to diplay the users from the araylist in tomcat status window...
What do you mean by "tomcat status window"?
|
 |
Vas Miriyala
Ranch Hand
Joined: Sep 14, 2009
Posts: 114
|
|
|
I am using Netbeans-6.0, I can able to see the output returned by the tomcat in output window,correct me if i am wrong
|
 |
Vijitha Kumara
Bartender
Joined: Mar 24, 2008
Posts: 3670
|
|
srinivas miriyala wrote:I am using Netbeans-6.0, I can able to see the output returned by the tomcat in output window,correct me if i am wrong
I'm not sure about the NetBeans but check the server log files inside the Tomcat, you'll find those there.
|
 |
Vas Miriyala
Ranch Hand
Joined: Sep 14, 2009
Posts: 114
|
|
|
okay ,can you tell me what might be the wrong in my code please
|
 |
 |
|
|
subject: JSTL+Servlet+beans
|
|
|