• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

JSTL+Servlet+beans

 
Ranch Hand
Posts: 114
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 4116
72
Mac TypeScript Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

srinivas miriyala wrote:.... I have written one class file for connecting database and it working properly and I stucked here..


Where? In JSTL?
 
Vas Miriyala
Ranch Hand
Posts: 114
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 4116
72
Mac TypeScript Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 114
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
okay let me try with that and i will let you know what happen anyway thanks for the reply
 
Vas Miriyala
Ranch Hand
Posts: 114
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 4116
72
Mac TypeScript Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 114
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 4116
72
Mac TypeScript Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 114
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
okay ,can you tell me what might be the wrong in my code please
 
It's hard to fight evil. The little things, like a nice sandwich, really helps. Right tiny ad?
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic