Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

select box is not populating

 
Abhimanyus singh
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Guys...I'm using JSTL to populate select box, so that it could fetch all the id's of the account holders from the database, but it is not working...
here are the files::

THE BEAN CLASS









WITHDRAWAL.JSP



Everything is executing.........but the control is not going inside the foreach loop......please help!!!
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64851
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where are you expecting the execute() method to be called from?

Why are you creating the been in the JSP rather than in the controller?
 
Abhimanyus singh
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Where are you expecting the execute() method to be called from?

Why are you creating the been in the JSP rather than in the controller?





it will be called from "struts.xml"....

and, since I'm new in the field of web development through java, so any kind of comprehensive help would be appreciated !!

Thanks,
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64851
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First, if you are new to JSP, please read this article.

Then, read this article to understand the proper structure of web applications.

And finally, since you are using Struts, I have moved this to the Struts forum.

In short: you should be creating and populating the bean in the controller, not the JSP.
 
Gopakumar Naryanan
Ranch Hand
Posts: 72
Eclipse IDE Hibernate Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



I think you need to make a correction here :



In the above code variable itself holds the "AccountId".. so please change it as follows:



Hope it works fine.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic