spring mvc - the array list from database is not displaying on browser but i can see it on the eclipse console -


this controller

@requestmapping(value = "/users/{userid}/providers/{providerid}/check", method = requestmethod.get) public string initnewdocumentform121(@pathvariable("userid") int userid,@pathvariable("providerid") int providerid, model model) {       list<jdbcdocument> documents = this.clinicservice.findbyprovideridanduserid(providerid, userid);     system.out.print("findbyprovideridanduserid");     system.out.print(documents);          return "users/myproviders"; } 

i can see documents array on eclipse console not on browser.

<select id="provider" class="form-control">         <option th:value="0" >select service provider</option>         <option th:each="document : ${documents}"  name="name"  th:value="${document.id}" th:text="${document.name}">[name]</option> </select> 

this html. cannot see output on browser. please guide me.

after getting object, have add object model below forward :

model.addobject("documents", documents); 

Comments

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -