• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to view list in drop down menu - JSTL

 
Padhma Prema
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64618
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why use code tags if you are going to disable them? I edited your message to fix the issue.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64618
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64618
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, this has been moved to a more appropriate location.
 
Padhma Prema
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anyone, could you please help me out here, with the above problem.
 
Karthik Rajendiran
Ranch Hand
Posts: 217
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Paul Clapham
Sheriff
Pie
Posts: 20729
30
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it significant that you used "sploginp1" in your controller and "splogin1" in your JSP?
 
Padhma Prema
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you. Yes typo error.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic