aspose file tools*
The moose likes Struts and the fly likes select box is not populating Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "select box is not populating" Watch "select box is not populating" New topic
Author

select box is not populating

Abhimanyus singh
Greenhorn

Joined: Apr 11, 2012
Posts: 27
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

Joined: Jan 10, 2002
Posts: 61202
    
  66

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?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Abhimanyus singh
Greenhorn

Joined: Apr 11, 2012
Posts: 27
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

Joined: Jan 10, 2002
Posts: 61202
    
  66

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

Joined: Jan 15, 2011
Posts: 72




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.


Thanks & Regards
Gopakumar
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: select box is not populating