Using ajax4jsf in my portlet application (together with MyFaces) I noticed that actions initiated by ajax4jsf command components (e.g. a4j:commandLink) cause Servlet Request but not Portlet Request ( possible Servlet but not Portlet URL are rendered). As a result MyFaces knows nothing about portal environment during this request ...
I am wondering whether this is a bug or feature?
Sending AJAX requests from portal page to a servlet is a workaround to a JSF-168 limitations. a4j-portlet integration code know about portal environment and will substitute appropriate JSF context.
Only portlet 2.0 specification have special methods to serve XMLHttpRequest or a resources ( script, styles, media etc ).