I have seen few samples using processRequest and render independently. In few examples, both co-exist. Can someone explain me when to use processRequest and render? What is the exact difference between them?
For example, I have a search form in which i enter a cust id. This should get me the details from the db and i have to display it in the next screen. There i can add a message and save it back to the db. Which method is appropriate in both the scenarios here?
Any help would be very much appreciated.
posted 11 years ago
Both methods belong to the javax.portlet.Portlet interface, which describes the life cycle of a portlet in JSR 168. And both of them are used to handle requests:
processAction() Called after the user submits changes to a portlet. Intended to process input from a user action.
render() Called whenever the portlet is redrawn by the desktop.
Therefore in every non trivial portlet component you use both of them.
Author of German LDAP-Book
Committer at Apache Directory Project
"Padmanaban"- Welcome back to the JavaRanch! Please take a sec to adjust your display name to match the JavaRanch Naming policy. Basically you need to have a first and last name. You can tweak it here.
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads