doView() = handle render requests in view mode.
render() = This method calls the doDispath() method and sets the portlet title using the getTitle() method. Then it calls one of doView() , doEdit() , doHelp() , etc. Depending on the portlet mode specified in RenderRequest .
Again, RenderRequest is when you want to process requests in the VIEW portlet mode. If your portlet uses additional resources to render the view (i.e. images, JavaScript files, etc.), then the JSP that displays the view will use the <portlet:resourceURL /> tags to generate valid URLs for these resources. These URLs will be processed using a pair of ResourceRequest and ResourceResponse objects.
You can override the phase of the resource, but remember that when you use ResourceRequest / ResourceResponse for maintenance, the portlet cannot change the current portlet mode, window state, or rendering options. Also, the parameters specified on the resource URLs are not rendering parameters, and they are valid for serving only this current resource request.
source share