how can i get all data from all the rows from a table into my Groovy Server Pages(GSP) page from MySQL
database?
already have tried to get list but not successful.
def list(){
def student1 = Student.getAll(1,2,3)
[student:student1]
}
def list(){
[students: Student.list()]
}
and in your list.gsp
<ul>
<g:each in="${students}" var="student">
<li>${student.id}</li> <!-- or other property -->
</g:each>
<ul>