I have a serveresource method which is invoked on clicking a link. The serveresource method takes the input from the parameter that was passed and retrieves a row from the database. Now all the values in a row are in set using the mutator methods. I have everything in a java object. I need to pass this object to a jsp page to print the values of a single row on the jsp page. I am not sure how to handle that java object in the jsp page instead of setting each value as an attribute in the serveresource method. Need help from experts.. Thanks in Advance
UPDATE
It was because I have an Ajax call and when I set values it is in a completely different life cycle which is causing the problem. I figured it out.
You should defining the java object as Bean in JSP. The Bean in JSP can be defined using < jsp:useBean..> standard jsp tag. And set and get property using < jsp:setProperty..> and < jsp:getProperty..> standard jsp tags.
Refernces: