B4J Question jServer setting page content based on outside server's response


Well-Known Member
Licensed User
Longtime User
Here's the case: I have an activation page served by jServer. Upon data submission, I post these data to an external server's php, in order to validate the installation, which then sends back a confirmation.
The problem is, I cannot get the jServer's servlet response really get these data. It seems to me like there's a time limitation or something.
For now, I reopen a browser's window in order to set the final confirmation, but it would be better to simply feed the servlet with data.

Here's how the code was organized:

Sub Handle(req As ServletRequest, resp As ServletResponse)
Case "validate"
end select
end sub

Sub intraSetLicence2(myMap As Map,myResp2 As ServletResponse)
 myResp=myResp2:' a private holding the servlet
Dim jb As HttpJob
   Dim myQuery As String =myDataHere
end sub

Sub jobDone (job As HttpJob)
   Log("JobName = " & job.JobName & ", Success = " & job.Success)
  Dim s As String
   If job.Success = True Then
   End If
End Sub

Sub createFinalLicence3(myString As String)
   myResp.ContentType = "text/HTML;charset=UTF-8"

End Sub
In reality the above code, is using AJAX to insert data in a div. Before this attempt, I had setting data with no AJAX.
I have to mention that everything works ok, online validation, response, it's just that I cannot set the response (it seems to load before the arrival of data). Is it perhaps a time limitation?


Well-Known Member
Licensed User
Longtime User
Ah, great! I had tried startMessageLoop, but I ended it at the final sub, while putting at the end of jobDone did the trick. Thank you very much.
Upvote 0