B4J Question A simple server question

TomDuncan

Active Member
Licensed User
Longtime User
Hi All,
I am re-writing my web server from a few years ago. (ge
My thoughts are to build each page when requested then save that page, then show it.
I have this
B4X:
Sub Handle(req As ServletRequest, resp As ServletResponse)
    mreq = req
    mresp = resp
    Dim sessionid As String = req.GetSession.Id
'    Log("Request Session ID: " & sessionid)
    Log("Request URI:" & req.RequestURI)
'    Log("Request FullRequestURI: " & req.FullRequestURI)
'    Log("Request ContentType:  " & req.ContentType)
    Dim s As String = req.RequestURI
    If s.Contains(".html") Then
        Dim htm As String = buildpage.BuildCurrentPage(req.RequestURI)
        If htm <> Null Then resp.Write(s)
'    Else
'        resp. .Write(s)
    End If  
End Sub

This is fired whenever a page is called.
Now a simple question.
How can I refresh the browser when the page has been built (from the BuildCurrentPage routine)
I will be adding a check for the server page not to be built if no changes on the page since last build.

Thanks in advance.
Tom
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…