LMAppletserver in Glassfish

LMAppletserver is a toolkit for automatic deployment of java classes (or jars) to your browser, and an rpc library for easily calling methods on the server. The intention is to enable effective code reuse between the client and the server, and not have to repackage the classes for the client. Also a way of calling server methods - that is to give the feeling of coding "directly on the server".

Download the example project from sourceforge.net:


unzip SimplestLMAppletserverProject.zip

cd SimplestLMAppletserverProject


To deploy the application to Glassfish:

asadmin deploydir simplelmapp.war

Open in your browser:


And see the hello world applet...

The applet shows a message that is obtained by calling a business method on the server, using the RPC features of LMAppletserver. This is what happens in the applet:

HelloWorldBeanIF helloObj = (HelloWorldBeanIF)AppletServiceClientProxy.newInstance(HelloWorldBeanIF.class);
add(new JLabel(helloObj.sayHello()));

And on the server:

public class HelloWorldBean implements HelloWorldBeanIF {

public String sayHello() {
return "Hello world!";


See? Calling server methods using LMAppletServer clients is really simple .. :)


Popular posts from this blog

My VNC based development environment with Visual Studio Code running on Ubuntu

Intercepting and adjusting SQL generated by Eclipselink JPA

Exporting Kendo UI GRID to Excel with Java