Entradas

Mostrando entradas de marzo, 2022

09. Using WebSockets and HTTP

Introduction Thanks to BalusC  for the valuable information! WebSockets enables server-client communication much more fluently than servlets! In long processes, you can inform the user of everything that is happening in time. In the servlets, you need to wait till the process has ended or use asynchronous servlets that are prune error.  Information on WebServlets can be seen on Oracle web . and better in another post from Abhishek Gupta Here is his code but changing "javax" with " jakarta " These files are needed: A java WebSocket endpoint (EndPoint.java) A Server Endpoint Config.Configurator ( HttpSessionConfigurator.java) A client WebSocket implemented in Html with javascript code (websocket.html) EndPoint.java package gupta ; import java . io . IOException ; //import http.SessionWrapper; import jakarta . servlet . http . HttpSession ; import jakarta . websocket . EndpointConfig ; import jakarta . websocket . OnOpen ; import jakarta . websocket . Ses

08. Parameters to change in distribution (???)

 1. dao.properties Verify that the property persistence.hosts points to the database server (xxx.xxx.xxx.29) or to the local machine (127.0.0.1) when the persistence unit is "control_post! 2. persistence_control_post-properties The properties file name  for a persistence unit is " properties_ PERSISTENCE_UNIT_NAME .properties " 2.1 Verify the IP addresses of the database server (xxx.xxx.xxx.29) or to the local machine (127.0.0.1) in the property  hibernate.connection.url 2.2 Verify if the persistence unit makes use of JNDI (points to META-INF/context.xml ) or not. 2.3 If it does not use JDNI, then the user and password must be obfuscated in the properties file 2.4 Verify that the classes to be used (User, Role.., csv*) exists in the  mapped classes   2.5 If using JNDI  verify the IP of the database server and the database name in the " url " param 3. NO persistence.xml is used Verify that the WEB-INF/persistence.xml does not exist!!!! 4. Verify all propert