FUNCTION Process LOCAL lcParameter, lcOutFile, lcIniFile, lcOldError THIS.cHTMLPAGEPATH = THIS.oServer.oConfig.owwDemo.cHTMLPagePath THIS.cDATAPATH = THIS.oServer.oConfig.owwDemo.cDataPath PRIVATE Response, REQUEST, Server, Session, Process Process = THIS Response = THIS.oResponse Request = THIS.oRequest Server = THIS.oServer Session = THIS.oSession * This is the start of the gcHtml variable PRIVATE gcHtml gcHtml='< BODY BACKGROUND='+gcClient+'BACK2.JPG>' * This is where all VFP code is executed * gcHtml will get appended by all necessary HTML code Do MyProgram * At this point, we are ready to return the HTML to the WWC server * However, let see if we have some cookie to add IF LEN(gaCookie[1,1])>0 LOCAL loHeader,lnCompteur loHeader=CREATEOBJECT('wwHTTPHeader') loHeader.DefaultHeader() FOR lnCompteur=1 TO ALEN(gaCookie,1) loHeader.AddCookie(gaCookie[lnCompteur,1],gaCookie[lnCompteur,2],'/') NEXT Response.ContentTypeHeader(loHeader) ENDIF * We don't do the standard code for a location IF LEN(ALLTRIM(gcLocation))>0 IF LEN(gaCookie[1,1])=0 Response.Redirect(gcLocation) ELSE * In case we passed a cookie * We can't combine a cookie and a redirect * So, we have to call a page for one second P_OUT='< META HTTP-EQUIV=Refresh CONTENT="1;URL='+gcLocation+'">'+P_OUT ENDIF ENDIF * Let return the gcHtml variable to WWC Response.Write(gcHtml) ENDFUNCNo were are not calling ExpandEmplate.