Hi, I am a Spring newbie and have the assignment to explore a framework in about 10 days for my Java certification. My choice was Spring which was not the easiest choice i think.
Because i also have to show a working demo, i try to build the application simultaneous my theory reading. So already my apologies if i am making wrong statements, use incorrect terms, etc.
I currently have build a simple application with one controller. The application allows the user to fill in a complaint, enter the way he/she wants to get informed about the process and finally receives a initial e-mail or sms depending on the entered choice. The application uses the following bean in the applicationContext.xml to select the valid class for sending the message.
In the klachtView.jsp (welcome page) shown below i want to list the key values of the klachtService bean defined in applicationContext.xml. If this is possible, what should i to correct this, because currently this gives an 'Neither BindingResult nor plain target object for bean name 'klachtService' available as request attribute' at line 84 where the bind is done.
anything you want to display in a jsp page, you just have to include it into the Model that you make/return from your controller. It can be anything. But unless it is in your model or HttpSession or other Web objects, then you won't have access to it. The Web page has no idea about your Application Context, nor should it.
Thanks for the reply. I did know that it had to be in the model somehow, like using any other servlet. But had no clue how to implement it in a Spring 2 framework application. In my controller i only had the onSubmit method, the only method i had worked with. This method is not executed when the initial get of the page is done. I finally found the formBackingObject method wherein i create a new instance of my object. I add some default property values here by reading the properties of bean defined in my applicationContext.xml.