For the client example there are the following additional sources:
We have used the following directory layout for the Java sources (Client.java and Stub.java), the Prolog text (agent.p) and the JSP service page (service.jsp). We also reuse some artefacts from the previous terminal, standalone and servlet example, but we do not show them here:
The compilation is done similar as for the previous examples, and we do not show it here. The building of an archive for the Java compiled classes (*.class) and the Prolog texts (*.p) is also not shown, we again refer to the previous examples.
There will be now two directory layouts for the byte code. One for the client side and one for the server side. For the client side we used a very similar layout to the one of the standalone Swing GUI application, so that we run it again from the IDE. We do not show the placement of the Jekejeke Prolog runtime library (interpreter.jar) which is also required:
For the server side we used a very similar layout to the one of the servlet application, so that we could use the same web server. Once again the only visible file element will be the JSP service page. We do not show the placement of the web context archive (hello.jar) and the Jekejeke Prolog runtime library (interpreter) which is also required:
There are different approaches to deploy a web context to a web server. We find creating a .war file or plain copying of the directory tree. When the start of the web server was successful the client side Swing GUI can be started to access the service on the server.