I want to run JADE middleware GUI from JSP, for that I created a "Dynamic Web Project" and made right click on WebContent folder and select New .. Other ..type JsP file and gave the name e.g. runJADE.jsp. Now add the following details inside runJADE.jsp
<%@ page import="jade.core.*"%>
<% try {
String [] _args = {"-gui"};
jade.Boot.main(_args);
} catch (Exception ex) {
out.println(ex);
ex.printStackTrace();
}
%>
<HTML>
<BODY>
JADE is running.
</BODY>
</HTML>
I also tried the following code in JSP page:
<%@ page import="jade.core.Profile,jade.core.ProfileImpl,jade.core.Runtime,jade.wrapper.AgentContainer %>
<% try {
Profile profile = new ProfileImpl();
profile.setParameter(Profile.GUI, "true");
AgentContainer mainContainer = Runtime.instance().createMainContainer(profile);
} catch (Exception ex) {
out.println(ex);
ex.printStackTrace();
}
%>
<HTML>
<BODY>
JADE is running.
</BODY>
</HTML>
The code gives fine result by launching the JADE but refreshing the page leads to create another GUI. Am I missing some basic step? and how to avoid this problem?