B4J Tutorial [WebApp] Web Apps Overview

Status
Not open for further replies.

Erel

B4X founder
Staff member
Licensed User
Longtime User
ServerExampleNoMySQL project was updated. It fixes an issue with Safari browsers ignoring the existing session in WebSocket connections.

The solution is to add a filter that creates the session (if needed) before the upgrade request:
B4X:
srvr.AddFilter("/b4j_ws.js", "SessionCreator", False)

The filter code:
B4X:
Public Sub Filter(req As ServletRequest, resp As ServletResponse) As Boolean
   req.GetSession
   Return True
End Sub
 

RobertNM

Member
Licensed User
 

Buks

Member
Licensed User
Longtime User
I deployed the ServerExampleNoMySQL to a Raspberry PI 2B via B4J-Bridge.
I get the following error when trying to open the web from Google Chrome browser:
HTTP ERROR 404
Problem accessing /. Reason:

Not Found


Powered by Jetty:// 9.4.z-SNAPSHOT

Is there a better way to create web applications on a Raspberry PI?

Kind regards
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…