• Post Reply Bookmark Topic Watch Topic
  • New Topic

Need help to complete HTML code for JSP

 
Ali Gordon
Ranch Hand
Posts: 182
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my book, the JSP code is supposed to iterate over the contents of a HTML table. The book only gives me the HTML and JSP snippet. I need help to complete the code so that it will run. My HTML code has no "variable" called movie list.

HTML -



JSP -



What i tried -


 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65524
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HTML doesn't have variables, and JSP knows nothing about the HTML it is creating. To the JSP engine, the HTML template text might as well be the text of the Magna Carta. So looking to the HTML for the definition of a scoped variable is 180º in the wrong direction.

Scoped variables are created on the server by server-side components; so HTML plays no part.

The most likely scenario is that movieList is a List instance created by the page controller and set into request scope before forwarding to the JSP.
 
Ali Gordon
Ranch Hand
Posts: 182
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:HTML doesn't have variables, and JSP knows nothing about the HTML it is creating. To the JSP engine, the HTML template text might as well be the text of the Magna Carta. So looking to the HTML for the definition of a scoped variable is 180º in the wrong direction.

Scoped variables are created on the server by server-side components; so HTML plays no part.

The most likely scenario is that movieList is a List instance created by the page controller and set into request scope before forwarding to the JSP.


Thanks bear. I changed the example to learn jsp.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!