Yes, see my comment above.  A portlet should not contain "OpenMRS header" or "module header" at all.  It is meant to be a re-usable, configurable html fragment that is embedded in one or more other pages.  It is these other pages that include the openmrs header and module header, and would include the portlets.  Forget completely about using the "viewPortlet.htm..." stuff altogether.