tag:blogger.com,1999:blog-6262128735818493674.post2195762984440123349..comments2024-03-28T20:31:39.734+05:30Comments on Learning the code way: The ModelAndViewRobin Varghesehttp://www.blogger.com/profile/00841917517097216645noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-6262128735818493674.post-31480506771666262322017-06-01T18:28:33.273+05:302017-06-01T18:28:33.273+05:30I would assume that User is a simple POJO and has ...I would assume that User is a simple POJO and has a toString() method that returns name + " and age is " + age.Dan Nuttlehttps://www.blogger.com/profile/04140788295771112646noreply@blogger.comtag:blogger.com,1999:blog-6262128735818493674.post-40698251867808949712015-06-07T13:01:58.712+05:302015-06-07T13:01:58.712+05:30How "The first user is '<%=request.get...How "The first user is '<%=request.getAttribute("model") %>" is able to print <br /> "The first user is Dummy User and age is 10"?<br />My query is that from where it got this string "Dummy User and age is 10"??<br /><br />Also can you please share code of User class as well, i am hoping this comes from the constructor of user class.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6262128735818493674.post-48168921632539633122014-10-05T11:41:54.770+05:302014-10-05T11:41:54.770+05:30I believe Spring saves the object with the name of...I believe Spring saves the object with the name of the class, So the object autoUser of type User was saved with attribute name "user"<br />Sorry, I am talking from memory, so if you see a different behavior do let me know. For instance, check if you can add two objects of the same class. How would you retrieve them ? Does Spring just return the last added instance ? Or it throws an error ? Food for thought...Robin Varghesehttps://www.blogger.com/profile/00841917517097216645noreply@blogger.comtag:blogger.com,1999:blog-6262128735818493674.post-7798977369133173812014-09-09T19:17:50.567+05:302014-09-09T19:17:50.567+05:30Can you please tell me, How will the expression &q...Can you please tell me, How will the expression "<%=request.getAttribute("user") %>" identifies the object "autoUser " of User with out mentioning the attribute name?<br />If Spring manages internally what is the name that it internally gives? How can we code just "request.getAttribute("user")" and gets the autoUser details.. Please do clarify..Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6262128735818493674.post-58462702391858201132013-11-10T00:20:16.730+05:302013-11-10T00:20:16.730+05:30I wanna say Thanks for clearing all my doubts!I wanna say Thanks for clearing all my doubts!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6262128735818493674.post-86698673012493018042013-06-01T15:38:46.368+05:302013-06-01T15:38:46.368+05:30Sure Sure Robin Varghesehttps://www.blogger.com/profile/00841917517097216645noreply@blogger.comtag:blogger.com,1999:blog-6262128735818493674.post-81403492110306796042013-06-01T12:05:52.650+05:302013-06-01T12:05:52.650+05:30Thanks Robin for this wonderful post. I was search...Thanks Robin for this wonderful post. I was searching for something like this..Thanks<br /><br />My email is nanosoft.indian@gmail.com.Anonymousnoreply@blogger.com