Meaningless Drivel is fun!*
The moose likes Other Application Frameworks and the fly likes Unable to view list in drop down menu - JSTL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Unable to view list in drop down menu - JSTL" Watch "Unable to view list in drop down menu - JSTL" New topic
Author

Unable to view list in drop down menu - JSTL

Padhma Prema
Greenhorn

Joined: Dec 23, 2008
Posts: 15
Hello,

I have the following code in my controller:



I am putting the user name and the list of person of role type customer into the model, myModel.
When I debug, I am able to see the customer names in custList.

But the names wont appear on screen in the drop down. Could someone please throw some light. I have been breaking my head for the last 16hrs on this.

This is my JSP code:


It shows me a empty drop down with no values in it.
This program, is able to fetch the data from database and populate the model with it. In debug mode , as mentioned earlier, I can see the customers names but i dont see them in my JSP page.

Can someone please help.

Thank You.


Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60782
    
  65

Why use code tags if you are going to disable them? I edited your message to fix the issue.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60782
    
  65

return new ModelAndView("sploginp1", "sploginp1", myModel);

This is not part of any Servlet or JSP API. If you are using a framework you need to specify which.
Padhma Prema
Greenhorn

Joined: Dec 23, 2008
Posts: 15
I am sorry, my bad. I am using Spring Framework.
Wit Hibernate to persist object to DB using DAO.

Thank you.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60782
    
  65

OK, this has been moved to a more appropriate location.
Padhma Prema
Greenhorn

Joined: Dec 23, 2008
Posts: 15
Anyone, could you please help me out here, with the above problem.
Karthik Rajendiran
Ranch Hand

Joined: Aug 13, 2004
Posts: 211
1. Was JSTL tags working properly for you .i.e Are you able to print using c:out tags and c:foreach tags
2. Check your web.xml whether it is referring > 2.4 xsd file. if it is referring 2.3 dtd, jstl wont work

SCJP 1.4 SCWCD 1.4 SCDJWS 1.4
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Is it significant that you used "sploginp1" in your controller and "splogin1" in your JSP?
Padhma Prema
Greenhorn

Joined: Dec 23, 2008
Posts: 15
Thank you. Yes typo error.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unable to view list in drop down menu - JSTL
 
Similar Threads
Ajax with Spring MVC
Populating a value based on the option selected in the dropdown
Retain option selected value on submit
Displaying Tabular data using custom tags
Spring Framework-Passing Model data from Controller to JSP