Oracle11g Forms run by Java Web Start: Difference between revisions
(Created page with "Most of modern '''Web Browsers''' relays on '''HTML5'''. Due to the security reason they obsoleted '''Adobe Flash Player, Silver Light and Java Applet too'''. Most recently O...") |
No edit summary |
||
(13 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Most of modern '''Web Browsers''' relays on '''HTML5'''. Due to the security reason they obsoleted '''Adobe Flash Player, Silver Light and Java Applet too'''. Most recently Oracle announce not to support(End of Life) '''Java Applet''' using Web Browser, where they will remain support | Most of the modern '''Web Browsers''' relays on '''HTML5'''. Due to the security reason they obsoleted '''Adobe Flash Player, Silver Light and Java Applet too'''. Most recently Oracle announce not to support(End of Life) '''Java Applet''' using Web Browser, where they will remain support for '''Java Web Start'''. It would be quite difficult to run '''Oracle Applet Based Forms''' in modern '''Web Browsers'''. It would be little bit tricky but best solution for Oracle developer to run Oracle Forms as a separate application. For the days it's very stable and reliable. | ||
== Java Web Start (JNLP) == | |||
<syntaxhighlight lang=" | <code>http://dev.chorke.org/forms/chorke-ebis-launch.jnlp.jsp</code> | ||
<syntaxhighlight lang="jsp"> | |||
<%@ page language="java" import="java.sql.*" session="true"%> | |||
<%@ page trimDirectiveWhitespaces="true" %> | |||
<% | |||
response.setDateHeader ("Expires", 0); | |||
response.setContentType("application/x-download"); | |||
response.setHeader("Content-Disposition", "attachment; filename=chorke-ebis-launch.jnlp"); | |||
%> | |||
<% | |||
long time = System.currentTimeMillis(); | |||
String sessid = String.valueOf(time); | |||
String scheme = String.valueOf(request.getScheme()); | |||
String serverName = String.valueOf(request.getServerName()); | |||
String serverPort = String.valueOf(request.getServerPort()); | |||
String contextPath = String.valueOf(request.getContextPath()); | |||
String javaArchives = "frmwebutil.jar,handlemouseevent.jar,mouse.jar,"; | |||
javaArchives += "ReportMonitor.jar,DirectPrint.jar,ColorSlider.jar,"; | |||
javaArchives += "FormsGauge.jar,FormsGraph.jar,xmlparserv2.jar,"; | |||
javaArchives += "commons-logging-1.2.jar"; | |||
javaArchives = "frmwebutil.jar"; //FIXME | |||
if("http".equals(scheme)){ | |||
serverPort = ("80".equals(serverPort)) ? "" : String.format(":%s", serverPort); | |||
}else if("https".equals(scheme)){ | |||
serverPort = ("443".equals(serverPort)) ? "" : String.format(":%s", serverPort); | |||
} | |||
//String serverPath = String.format("%s://%s%s%s", scheme, serverName, serverPort, contextPath); | |||
String serverPath = String.format("%s://%s%s", scheme, serverName, serverPort); | |||
String[] jars = javaArchives.split(","); | |||
%> | |||
<?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||
<jnlp codebase=" | <jnlp spec="1.0+" codebase="<%=serverPath%>/forms/java/" xhref="chorke-ebis-launch.jnlp"> | ||
<information> | <information> | ||
<title>EBIS</title> | <title>EBIS</title> | ||
Line 11: | Line 43: | ||
<description> | <description> | ||
Chorke EBIS(Enterprise Business Intelegent Suite) | Chorke EBIS(Enterprise Business Intelegent Suite) | ||
built by Oracle Forms | built by Oracle Forms 11g FM. @Copyright 2017. | ||
</description> | </description> | ||
</information> | </information> | ||
Line 21: | Line 53: | ||
<j2se version="1.6.0"/> | <j2se version="1.6.0"/> | ||
<jar href="frmall.jar" download="eager" main="true"/> | <jar href="frmall.jar" download="eager" main="true"/> | ||
<% for(int i=0;i<jars.length;i++) { %> | |||
<jar href="<%=jars[i]%>"/> | |||
<% } %> | |||
</resources> | </resources> | ||
<applet-desc name=" | <applet-desc name="EBIS" main-class="oracle.forms.engine.Main" width="990" height="640"> | ||
<param name="background" value="no"/> | <param name="background" value="no"/> | ||
<param name="logo" value="no"/> | <param name="logo" value="no"/> | ||
Line 32: | Line 67: | ||
<param name="latencyCheck" value="true"/> | <param name="latencyCheck" value="true"/> | ||
<param name="networkRetries" value="240"/> | <param name="networkRetries" value="240"/> | ||
<param name="serverArgs" value="module=test.fmx useSDI=yes"/> | <param name="serverArgs" value="escapeParams=true module=test.fmx useSDI=yes"/> | ||
<param name="serverURL" value=" | <param name="serverURL" value="<%=serverPath%>/forms/lservlet?ifcfs=<%=serverPath%>/forms/frmservlet?config=jpi&ifsessid=formsapp.<%=sessid%>"/> | ||
<param name="colorScheme" value="teal"/> | <param name="colorScheme" value="teal"/> | ||
<param name="splashScreen" value="no"/> | <param name="splashScreen" value="no"/> | ||
Line 40: | Line 75: | ||
</jnlp> | </jnlp> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== Run Oracle11g Web Start == | |||
Download <code>[http://dev.chorke.org/forms/chorke-ebis-launch.jnlp.jsp chorke-ebis-launch.jnlp]</code> from your '''Web Browser, CURL or Wget''' from <code>http://dev.chorke.org/forms/chorke-ebis-launch.jnlp.jsp</code> | |||
=== Using Batch Script === | |||
<syntaxhighlight lang="batch"> | |||
SET JAVA_HOME=C:\Program Files\Java\jre6 | |||
SET PATH=%JAVA_HOME%\bin;%PATH% | |||
javaws chorke-ebis-launch.jnlp | |||
</syntaxhighlight> | |||
=== Using Bash Shell === | |||
<syntaxhighlight lang="bash"> | |||
export JAVA_HOME="/opt/java/jre6" | |||
export PATH="$JAVA_HOME/bin:$PATH" | |||
javaws chorke-ebis-launch.jnlp | |||
</syntaxhighlight> | |||
To avoid '''Java Default Security''', Please open <code>javacpl</code>('''Java Control Panel''') form your terminal Then update your security settings. Please try again to run. Before deployment dependencies like jar, don't forget to Sign else like following exception may occurred! | |||
com.sun.deploy.net.JARSigningException: Found unsigned entry in resource: http://dev.chorke.org/forms/java/commons-logging-1.2.jar | |||
at com.sun.javaws.security.SigningInfo.getCommonCodeSignersForJar(Unknown Source) | |||
at com.sun.javaws.security.SigningInfo.check(Unknown Source) | |||
at com.sun.javaws.LaunchDownload.checkSignedResourcesHelper(Unknown Source) | |||
at com.sun.javaws.LaunchDownload.checkSignedResources(Unknown Source) | |||
... more ... |
Latest revision as of 03:07, 26 December 2017
Most of the modern Web Browsers relays on HTML5. Due to the security reason they obsoleted Adobe Flash Player, Silver Light and Java Applet too. Most recently Oracle announce not to support(End of Life) Java Applet using Web Browser, where they will remain support for Java Web Start. It would be quite difficult to run Oracle Applet Based Forms in modern Web Browsers. It would be little bit tricky but best solution for Oracle developer to run Oracle Forms as a separate application. For the days it's very stable and reliable.
Java Web Start (JNLP)
http://dev.chorke.org/forms/chorke-ebis-launch.jnlp.jsp
<%@ page language="java" import="java.sql.*" session="true"%>
<%@ page trimDirectiveWhitespaces="true" %>
<%
response.setDateHeader ("Expires", 0);
response.setContentType("application/x-download");
response.setHeader("Content-Disposition", "attachment; filename=chorke-ebis-launch.jnlp");
%>
<%
long time = System.currentTimeMillis();
String sessid = String.valueOf(time);
String scheme = String.valueOf(request.getScheme());
String serverName = String.valueOf(request.getServerName());
String serverPort = String.valueOf(request.getServerPort());
String contextPath = String.valueOf(request.getContextPath());
String javaArchives = "frmwebutil.jar,handlemouseevent.jar,mouse.jar,";
javaArchives += "ReportMonitor.jar,DirectPrint.jar,ColorSlider.jar,";
javaArchives += "FormsGauge.jar,FormsGraph.jar,xmlparserv2.jar,";
javaArchives += "commons-logging-1.2.jar";
javaArchives = "frmwebutil.jar"; //FIXME
if("http".equals(scheme)){
serverPort = ("80".equals(serverPort)) ? "" : String.format(":%s", serverPort);
}else if("https".equals(scheme)){
serverPort = ("443".equals(serverPort)) ? "" : String.format(":%s", serverPort);
}
//String serverPath = String.format("%s://%s%s%s", scheme, serverName, serverPort, contextPath);
String serverPath = String.format("%s://%s%s", scheme, serverName, serverPort);
String[] jars = javaArchives.split(",");
%>
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="<%=serverPath%>/forms/java/" xhref="chorke-ebis-launch.jnlp">
<information>
<title>EBIS</title>
<vendor>Chorke, Inc.</vendor>
<homepage href="chorke.org"/>
<description>
Chorke EBIS(Enterprise Business Intelegent Suite)
built by Oracle Forms 11g FM. @Copyright 2017.
</description>
</information>
<security>
<all-permissions/>
</security>
<update check="timeout" policy="always"/>
<resources>
<j2se version="1.6.0"/>
<jar href="frmall.jar" download="eager" main="true"/>
<% for(int i=0;i<jars.length;i++) { %>
<jar href="<%=jars[i]%>"/>
<% } %>
</resources>
<applet-desc name="EBIS" main-class="oracle.forms.engine.Main" width="990" height="640">
<param name="background" value="no"/>
<param name="logo" value="no"/>
<param name="serverApp" value="default"/>
<param name="lookAndFeel" value="oracle"/>
<param name="allow_debug" value="true"/>
<param name="separateFrame" value="false"/>
<param name="em_mode" value="1"/>
<param name="latencyCheck" value="true"/>
<param name="networkRetries" value="240"/>
<param name="serverArgs" value="escapeParams=true module=test.fmx useSDI=yes"/>
<param name="serverURL" value="<%=serverPath%>/forms/lservlet?ifcfs=<%=serverPath%>/forms/frmservlet?config=jpi&ifsessid=formsapp.<%=sessid%>"/>
<param name="colorScheme" value="teal"/>
<param name="splashScreen" value="no"/>
<param name="dontTruncateTabs" value="true"/>
</applet-desc>
</jnlp>
Run Oracle11g Web Start
Download chorke-ebis-launch.jnlp
from your Web Browser, CURL or Wget from http://dev.chorke.org/forms/chorke-ebis-launch.jnlp.jsp
Using Batch Script
SET JAVA_HOME=C:\Program Files\Java\jre6
SET PATH=%JAVA_HOME%\bin;%PATH%
javaws chorke-ebis-launch.jnlp
Using Bash Shell
export JAVA_HOME="/opt/java/jre6"
export PATH="$JAVA_HOME/bin:$PATH"
javaws chorke-ebis-launch.jnlp
To avoid Java Default Security, Please open javacpl
(Java Control Panel) form your terminal Then update your security settings. Please try again to run. Before deployment dependencies like jar, don't forget to Sign else like following exception may occurred!
com.sun.deploy.net.JARSigningException: Found unsigned entry in resource: http://dev.chorke.org/forms/java/commons-logging-1.2.jar at com.sun.javaws.security.SigningInfo.getCommonCodeSignersForJar(Unknown Source) at com.sun.javaws.security.SigningInfo.check(Unknown Source) at com.sun.javaws.LaunchDownload.checkSignedResourcesHelper(Unknown Source) at com.sun.javaws.LaunchDownload.checkSignedResources(Unknown Source) ... more ...