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:
http://sourceforge.net/project/downloading.php?group_id=142974&use_mirror=osdn&filename=SimplestLMAppletserverProject.zip&2731151
unzip SimplestLMAppletserverProject.zip
cd SimplestLMAppletserverProject
ant
To deploy the application to Glassfish:
asadmin deploydir simplelmapp.war
Open in your browser:
http://localhost:8080/simplelmapp/
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 .. :)
Download the example project from sourceforge.net:
http://sourceforge.net/project/downloading.php?group_id=142974&use_mirror=osdn&filename=SimplestLMAppletserverProject.zip&2731151
unzip SimplestLMAppletserverProject.zip
cd SimplestLMAppletserverProject
ant
To deploy the application to Glassfish:
asadmin deploydir simplelmapp.war
Open in your browser:
http://localhost:8080/simplelmapp/
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 .. :)
Comments