change Dom element based on firebase admin value events

前端 未结 2 934
鱼传尺愫
鱼传尺愫 2021-01-28 03:37

I have a simple HTML page printed out inside a Servlet. Here I have setup firebase admin sdk and have set a value event listener for a path.

When the events fire, I wish

2条回答
  •  面向向阳花
    2021-01-28 04:03

    With servlets, your clients won't see any page updates until they send a new request to your application server. What you can do is get your ValueEventListener to update the state of an in-memory object. Then your servlet can read the latest state of that object whenever constructing the HTML output.

提交回复
热议问题