• Beans, JSP and JSTL

    Ganesh Member

    I am connecting to a database, which stores my locations. I ran a query and obtained what I needed.
    I created a servlet, which handles all the coding. I have a bean that has the properties of a location. and my jsp will be displaying everything.

    I having problems printing whats in my bean to the jsp.

    This is just a little snippet of what I am doing

    coffeeshopbean = the id of my bean
    coffeeBeans is the Arraylist that has Beans
    name is a property that my bean has
    But nothing gets printed. Any suggestions? maybe my syntax?

  • Nina Member

    Please send your POJOs as it would help us understand how the model fits together. I am confused, does a coffeeshopbean contain multiple coffeeBeans or does a coffeeBeans list contain multiple coffeeshopbean objects?

    If you just have a bunch of coffeeshop beans in a list coffeeBeans, then perhaps you’re looking at doing something like this?

    I would then be the variable pointing to a single coffeeshop bean, so you should then be able to get the name of the coffeeshop by doing


    as per the rest of your snippet.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.