|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
JSP in ColdFusion issue
Eric,Pete Freitag 02/08/10 11:23 A There is some XML code that is in the web.xml...Eric Roberts 02/08/10 11:35 A > Here is the xml in web.xml...Dave Watts 02/08/10 01:33 P > Here is the xml in web.xml...Eric Roberts 02/08/10 01:51 P The url doesn't resolve unless I add that folder and put the jar files inEric Roberts 02/08/10 01:55 P > The url doesn't resolve unless I add that folder and put the jar files inDave Watts 02/08/10 02:40 P OK...so I added the directory to the actual web root and now I get theEric Roberts 02/08/10 02:04 P Unauthorized Applet Use is almost assuredly a java security policyJudah McAuley 02/08/10 02:08 P Thanks...why do they make this so difficult? What app are you guys using?Eric Roberts 02/08/10 02:15 P We are using the Topaz capture devices and then wrote an appletJudah McAuley 02/08/10 04:14 P I finally heard back from the company that makes this. Apparently I neededEric Roberts 02/08/10 05:49 P >> java.io.FileNotFoundException: https://localhost/jobappl_qa/EzApplet/ezsign-applet.jarJudah McAuley 02/08/10 02:06 P I am running into a bit of an issue. We are trying to implement a mouse signature pad called EZ-Signature. It is a java based package, that seems to be designed around JSP. There are no Javadocs or anything similar that I can use to address it directly in java. The only examples thay have are all done in JSP. SOI have the jsp beling called properly, but the page is reporting an error in the Java/JSP. It is unable to find the functions in the jar files.(com.ez_signature.signature for instance). We are running CF6.1 (yes I know hehehe) The jar files are in C:\CFusionMX\wwroot\web-inf\lib and the .properties files are in the classes folder. Here’s the code that I am invoking…any idea on what I am doing wrong… <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"> <%@ page language="java" contentType="text/html" import="java.util.*,com.ez_signature.signature.*;"%> <% try { String throughParms = ""; String url = HttpUtils.getRequestURL(request).toString(); String domain = WebUtil.getDomain(request); String section = WebUtil.getSection(request); String http = (url.indexOf("https") > -1 ? "https://" : "http://"); String applet = "com.ez_signature.signature.Sign"; String codeBase = "EzApplet"; String archive = "ezsign-applet.jar"; String bgImage = ""; String signatureSaveURL = http + domain + "/" + section + "/SaveServlet?x=x"; String afterSaveJavaScriptFunction = ""; String afterSaveRedirectURL = http + domain + "/" + section + "/index.jsp?page=/EzExamplesBasic-1b"; String submitButtonText = "See The Signature"; String imageFileName = ""; String imageSavePath = session.getServletContext().getRealPath("/").replace('\\', '/') + "images/signs/"; boolean showTimeStamp = true; boolean showCopyright = false; String copyrightString = "Copyright ? 2007 EZ-Signature, LLC - All Rights Reserved"; boolean isIE = false; boolean isMozilla = false; boolean isChrome = false; String brw = request.getHeader("user-agent"); if (brw != null) { isIE = brw.indexOf("MSIE") > -1; isMozilla = (brw.indexOf("Netscape") > -1 || brw.indexOf("Mozilla") > -1 ) && brw.indexOf("Safari") == -1; isChrome = brw.indexOf("Chrome") > -1; } if ( isChrome ) { //out.println("<h2 style='color:#FF0000'>Google Chrome does not support java applets at this time. Try firefox or IE.</h2>" ); } %> <script language="javascript" type="text/javascript"> if ( !navigator.javaEnabled() ) { //document.write("<h2 style='color:#FF0000'>Java is not enabled. The signature pad is a java applet and requires a java JRE.</h2>" ); } </script> <table class="signature-box"> <tr> <td> <% if (isIE) { %> <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" codebase="http://java.sun.com/products/plugin/autodl/jinstall-1_4-windows-i586.cab#Version=1,4,0,0" height="200" width="500"> <param name="code" value="<%=applet%>" /> <param name="codebase" value="<%=codeBase%>" /> <param name="archive" value="<%=archive%>" /> <param name="bgImage" value="<%=bgImage%>" /> <param name="signatureSaveURL" value="<%=signatureSaveURL%>" /> <param name="afterSaveJavaScriptFunction" value="<%=afterSaveJavaScriptFunction%>" /> <param name="afterSaveRedirectURL" value="<%=afterSaveRedirectURL%>" /> <param name="imageFileName" value="<%=imageFileName%>" /> <param name="imageSavePath" value="<%=imageSavePath%>" /> <param name="throughParms" value="<%=throughParms%>" /> <param name="submitButtonText" value="<%=submitButtonText%>" /> <param name="showTimeStamp" value="<%=showTimeStamp%>" /> <param name="showCopyright" value="<%=showCopyright%>" /> <param name="copyright" value="<%=copyrightString%>"> </object> <% } else if (isMozilla && !isChrome) { %> <object classid="java:com.ez_signature.signature.Sign" height="200" width="500"> <param name="code" value="<%=applet%>" /> <param name="codebase" value="<%=codeBase%>" /> <param name="archive" value="<%=archive%>" /> <param name="bgImage" value="<%=bgImage%>" /> <param name="signatureSaveURL" value="<%=signatureSaveURL%>" /> <param name="afterSaveJavaScriptFunction" value="<%=afterSaveJavaScriptFunction%>" /> <param name="afterSaveRedirectURL" value="<%=afterSaveRedirectURL%>" /> <param name="imageFileName" value="<%=imageFileName%>" /> <param name="imageSavePath" value="<%=imageSavePath%>" /> <param name="throughParms" value="<%=throughParms%>" /> <param name="submitButtonText" value="<%=submitButtonText%>" /> <param name="showTimeStamp" value="<%=showTimeStamp%>" /> <param name="showCopyright" value="<%=showCopyright%>" /> <param name="copyright" value="<%=copyrightString%>"> </object> <% } else { %> <applet code="<%=applet %>" version="1.4" cache_option="No" width="500" height="200"> <param name="codebase" value="<%=codeBase%>" /> <param name="archive" value="<%=archive%>" /> <param name="bgImage" value="<%=bgImage%>" /> <param name="signatureSaveURL" value="<%=signatureSaveURL%>" /> <param name="afterSaveJavaScriptFunction" value="<%=afterSaveJavaScriptFunction%>" /> <param name="afterSaveRedirectURL" value="<%=afterSaveRedirectURL%>" /> <param name="imageFileName" value="<%=imageFileName%>" /> <param name="imageSavePath" value="<%=imageSavePath%>" /> <param name="throughParms" value="<%=throughParms%>" /> <param name="submitButtonText" value="<%=submitButtonText%>" /> <param name="showTimeStamp" value="<%=showTimeStamp%>" /> <param name="showCopyright" value="<%=showCopyright%>" /> <param name="copyright" value="<%=copyrightString%>"> </applet> <% } %> </td> </tr> </table> <% } catch (Exception e) { System.out.println("EzSignature1.jsp Error: " + e); out.println(e.toString()); } %> <SCRIPT language="javascript" type="text/javascript"> <!-- // **************************************************** // // Do not remove or modify this javascript function!!! // // It is used by the signature applet. // // **************************************************** // function doSignatureAlert(message) { alert(message); } --> </SCRIPT> Eric, All the code you have posted you should be able to rewrite in CFML pretty easily, you don't even need their Java utilities, they are just used to extract the domain from the url, etc. One thing you might need is the SaveServlet, you might need to define a servlet mapping for this in your web.xml file, I am not sure what that Servlet does, but you can probably rewrite that in CF too. -- Pete Freitag http://foundeo.com/ - ColdFusion Consulting & Products http://petefreitag.com/ - My Blog http://hackmycf.com - Is your ColdFusion Server Secure? ----- Excess quoted text cut - see Original Post for more ----- There is some XML code that is in the web.xml... Here is how it is called... <td colspan="8" valign="middle" style="padding:2px;"><cfscript>GetPageContext().include("signature_pad.jsp");</cfscript></td> Here is the xml in web.xml... <servlet> <servlet-name>SaveServlet</servlet-name> <servlet-class>com.ez_signature.signature.SaveServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>SaveServlet</servlet-name> <url-pattern>/SaveServlet</url-pattern> </servlet-mapping> I am not sure what that does 100%...but I would assume that it is to save the signature image when you click on the button to do so...that is just a guess. Here are the errors from the java console (this is the part that may as well be in Greek *grin*...the only thing I can gleen is that the pathing may not be right, but as far as I can tell, everything is placed properly physically speaking.): Java Plug-in 1.6.0_18 Using JRE version 1.6.0_18-b07 Java HotSpot(TM) Client VM User home directory = C:\Documents and Settings\Administrator ---------------------------------------------------- c: clear console window f: finalize objects on finalization queue g: garbage collect h: display this help message l: dump classloader list m: print memory usage o: trigger logging q: hide console r: reload policy configuration s: dump system and deployment properties t: dump thread list v: dump thread stack x: clear classloader cache 0-5: set trace level to <n> ---------------------------------------------------- security: property package.access value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio. security: property package.access new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.javaws security: property package.access value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.javaws security: property package.access new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.javaws,com.sun.deploy security: property package.access value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.javaws,com.sun.deploy security: property package.access new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.javaws,com.sun.deploy,com.sun.jnlp security: property package.definition value null security: property package.definition new value com.sun.javaws security: property package.definition value com.sun.javaws security: property package.definition new value com.sun.javaws,com.sun.deploy security: property package.definition value com.sun.javaws,com.sun.deploy security: property package.definition new value com.sun.javaws,com.sun.deploy,com.sun.jnlp security: property package.access value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.javaws,com.sun.deploy,com.sun.jnlp security: property package.access new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.javaws,com.sun.deploy,com.sun.jnlp,org.mozilla.jss security: property package.definition value com.sun.javaws,com.sun.deploy,com.sun.jnlp security: property package.definition new value com.sun.javaws,com.sun.deploy,com.sun.jnlp,org.mozilla.jss basic: Added progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@df503 security: Accessing keys and certificate in Mozilla user profile: null security: JSS is not configured network: Cache entry not found [url: https://localhost/jobappl_qa/EzApplet/ezsign-applet.jar, version: null] network: Connecting https://localhost/jobappl_qa/EzApplet/ezsign-applet.jar with proxy=DIRECT network: Connecting http://localhost:443/ with proxy=DIRECT security: Loading Root CA certificates from C:\Program Files\Java\jre6\lib\security\cacerts security: Loaded Root CA certificates from C:\Program Files\Java\jre6\lib\security\cacerts security: Loading SSL Root CA certificates from C:\Program Files\Java\jre6\lib\security\cacerts security: Loaded SSL Root CA certificates from C:\Program Files\Java\jre6\lib\security\cacerts security: Loading Deployment SSL certificates from C:\Documents and Settings\Administrator\Application Data\Sun\Java\Deployment\security\trusted.jssecerts security: Loaded Deployment SSL certificates from C:\Documents and Settings\Administrator\Application Data\Sun\Java\Deployment\security\trusted.jssecerts security: Loading certificates from Deployment session certificate store security: Loaded certificates from Deployment session certificate store security: Checking if certificate is in Deployment denied certificate store security: Checking if certificate is in Deployment session certificate store security: Checking if SSL certificate is in Deployment permanent certificate store network: Connecting https://localhost/jobappl_qa/EzApplet/ezsign-applet.jar with cookie "CFID=200; CFTOKEN=80699936; JSESSIONID=1030f248a0dd$CF$8C$F" java.io.FileNotFoundException: https://localhost/jobappl_qa/EzApplet/ezsign-applet.jar at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source) at sun.plugin.PluginURLJarFileCallBack.downloadJAR(Unknown Source) at sun.plugin.PluginURLJarFileCallBack.access$000(Unknown Source) at sun.plugin.PluginURLJarFileCallBack$2.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at sun.plugin.PluginURLJarFileCallBack.retrieve(Unknown Source) at sun.net.www.protocol.jar.URLJarFile.retrieve(Unknown Source) at sun.net.www.protocol.jar.URLJarFile.getJarFile(Unknown Source) at sun.net.www.protocol.jar.JarFileFactory.get(Unknown Source) at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source) at sun.plugin.net.protocol.jar.CachedJarURLConnection.connect(Unknown Source) at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFileInternal(Unknown Source) at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFile(Unknown Source) at sun.misc.URLClassPath$JarLoader.getJarFile(Unknown Source) at sun.misc.URLClassPath$JarLoader.access$600(Unknown Source) at sun.misc.URLClassPath$JarLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at sun.misc.URLClassPath$JarLoader.ensureOpen(Unknown Source) at sun.misc.URLClassPath$JarLoader.<init>(Unknown Source) at sun.misc.URLClassPath$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at sun.misc.URLClassPath.getLoader(Unknown Source) at sun.misc.URLClassPath.getLoader(Unknown Source) at sun.misc.URLClassPath.getResource(Unknown Source) at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source) at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) network: Cache entry not found [url: https://localhost/jobappl_qa/EzApplet/ezsign-applet.jar, version: null] network: Connecting https://localhost/jobappl_qa/EzApplet/ezsign-applet.jar with proxy=DIRECT network: Connecting http://localhost:443/ with proxy=DIRECT network: Connecting https://localhost/jobappl_qa/EzApplet/ezsign-applet.jar with cookie "CFID=200; CFTOKEN=80699936; JSESSIONID=1030f248a0dd$CF$8C$F" network: Cache entry not found [url: https://localhost/jobappl_qa/EzApplet/com/ez_signature/signature/Sign.class, version: null] network: Connecting https://localhost/jobappl_qa/EzApplet/com/ez_signature/signature/Sign.class with proxy=DIRECT network: Connecting http://localhost:443/ with proxy=DIRECT network: Connecting https://localhost/jobappl_qa/EzApplet/com/ez_signature/signature/Sign.class with cookie "CFID=200; CFTOKEN=80699936; JSESSIONID=1030f248a0dd$CF$8C$F" network: Cache entry not found [url: https://localhost/jobappl_qa/EzApplet/com/ez_signature/signature/Sign.class, version: null] network: Connecting https://localhost/jobappl_qa/EzApplet/com/ez_signature/signature/Sign.class with proxy=DIRECT network: Connecting http://localhost:443/ with proxy=DIRECT network: Connecting https://localhost/jobappl_qa/EzApplet/com/ez_signature/signature/Sign.class with cookie "CFID=200; CFTOKEN=80699936; JSESSIONID=1030f248a0dd$CF$8C$F" basic: load: class com.ez_signature.signature.Sign not found. load: class com.ez_signature.signature.Sign not found. java.lang.ClassNotFoundException: com.ez_signature.signature.Sign at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source) at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.io.IOException: open HTTP connection failed:https://localhost/jobappl_qa/EzApplet/com/ez_signature/signature/Sign.class at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) ... 7 more Exception: java.lang.ClassNotFoundException: com.ez_signature.signature.Sign Ignored exception: java.lang.ClassNotFoundException: com.ez_signature.signature.Sign basic: Added progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@c9d92c network: Cache entry not found [url: https://localhost/jobappl_qa/EzApplet/com/ez_signature/signature/Sign.class, version: null] network: Connecting https://localhost/jobappl_qa/EzApplet/com/ez_signature/signature/Sign.class with proxy=DIRECT network: Connecting http://localhost:443/ with proxy=DIRECT network: Connecting https://localhost/jobappl_qa/EzApplet/com/ez_signature/signature/Sign.class with cookie "CFID=200; CFTOKEN=80699936; JSESSIONID=1030f248a0dd$CF$8C$F" network: Cache entry not found [url: https://localhost/jobappl_qa/EzApplet/com/ez_signature/signature/Sign.class, version: null] network: Connecting https://localhost/jobappl_qa/EzApplet/com/ez_signature/signature/Sign.class with proxy=DIRECT network: Connecting http://localhost:443/ with proxy=DIRECT network: Connecting https://localhost/jobappl_qa/EzApplet/com/ez_signature/signature/Sign.class with cookie "CFID=200; CFTOKEN=80699936; JSESSIONID=1030f248a0dd$CF$8C$F" basic: load: class com.ez_signature.signature.Sign not found. load: class com.ez_signature.signature.Sign not found. java.lang.ClassNotFoundException: com.ez_signature.signature.Sign at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source) at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.io.IOException: open HTTP connection failed:https://localhost/jobappl_qa/EzApplet/com/ez_signature/signature/Sign.class at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) ... 7 more Exception: java.lang.ClassNotFoundException: com.ez_signature.signature.Sign Ignored exception: java.lang.ClassNotFoundException: com.ez_signature.signature.Sign basic: Added progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@c837cd network: Cache entry not found [url: https://localhost/jobappl_qa/EzApplet/com/ez_signature/signature/Sign.class, version: null] network: Connecting https://localhost/jobappl_qa/EzApplet/com/ez_signature/signature/Sign.class with proxy=DIRECT network: Connecting http://localhost:443/ with proxy=DIRECT network: Connecting https://localhost/jobappl_qa/EzApplet/com/ez_signature/signature/Sign.class with cookie "CFID=200; CFTOKEN=80699936; JSESSIONID=1030f248a0dd$CF$8C$F" network: Cache entry not found [url: https://localhost/jobappl_qa/EzApplet/com/ez_signature/signature/Sign.class, version: null] network: Connecting https://localhost/jobappl_qa/EzApplet/com/ez_signature/signature/Sign.class with proxy=DIRECT network: Connecting http://localhost:443/ with proxy=DIRECT network: Connecting https://localhost/jobappl_qa/EzApplet/com/ez_signature/signature/Sign.class with cookie "CFID=200; CFTOKEN=80699936; JSESSIONID=1030f248a0dd$CF$8C$F" basic: load: class com.ez_signature.signature.Sign not found. load: class com.ez_signature.signature.Sign not found. java.lang.ClassNotFoundException: com.ez_signature.signature.Sign at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source) at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.io.IOException: open HTTP connection failed:https://localhost/jobappl_qa/EzApplet/com/ez_signature/signature/Sign.class at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) ... 7 more Exception: java.lang.ClassNotFoundException: com.ez_signature.signature.Sign Ignored exception: java.lang.ClassNotFoundException: com.ez_signature.signature.Sign basic: Added progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@1372656 network: Cache entry not found [url: https://localhost/jobappl_qa/EzApplet/com/ez_signature/signature/Sign.class, version: null] network: Connecting https://localhost/jobappl_qa/EzApplet/com/ez_signature/signature/Sign.class with proxy=DIRECT network: Connecting http://localhost:443/ with proxy=DIRECT network: Connecting https://localhost/jobappl_qa/EzApplet/com/ez_signature/signature/Sign.class with cookie "CFID=200; CFTOKEN=80699936; JSESSIONID=1030f248a0dd$CF$8C$F" network: Cache entry not found [url: https://localhost/jobappl_qa/EzApplet/com/ez_signature/signature/Sign.class, version: null] network: Connecting https://localhost/jobappl_qa/EzApplet/com/ez_signature/signature/Sign.class with proxy=DIRECT network: Connecting http://localhost:443/ with proxy=DIRECT network: Connecting https://localhost/jobappl_qa/EzApplet/com/ez_signature/signature/Sign.class with cookie "CFID=200; CFTOKEN=80699936; JSESSIONID=1030f248a0dd$CF$8C$F" basic: load: class com.ez_signature.signature.Sign not found. load: class com.ez_signature.signature.Sign not found. java.lang.ClassNotFoundException: com.ez_signature.signature.Sign at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source) at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.io.IOException: open HTTP connection failed:https://localhost/jobappl_qa/EzApplet/com/ez_signature/signature/Sign.class at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) ... 7 more Exception: java.lang.ClassNotFoundException: com.ez_signature.signature.Sign Ignored exception: java.lang.ClassNotFoundException: com.ez_signature.signature.Sign Thanks! Eric Eric, All the code you have posted you should be able to rewrite in CFML pretty easily, you don't even need their Java utilities, they are just used to extract the domain from the url, etc. One thing you might need is the SaveServlet, you might need to define a servlet mapping for this in your web.xml file, I am not sure what that Servlet does, but you can probably rewrite that in CF too. -- Pete Freitag http://foundeo.com/ - ColdFusion Consulting & Products http://petefreitag.com/ - My Blog http://hackmycf.com - Is your ColdFusion Server Secure? ----- Excess quoted text cut - see Original Post for more ----- ----- Excess quoted text cut - see Original Post for more ----- Those are just defining a servlet name and corresponding URL pattern. With that defined, the URL http://yourserver.com/SaveServlet should invoke the program located in com.ez_signature.signature named SaveServlet. ----- Excess quoted text cut - see Original Post for more ----- Does this URL resolve properly? It looks like you need a client-side applet to use this, and that the web server can't find it. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, on > Here is the xml in web.xml... > > <servlet> > <servlet-name>SaveServlet</servlet-name> > <servlet-class>com.ez_signature.signature.SaveServlet</servlet-class> ----- Excess quoted text cut - see Original Post for more ----- the signature image when you click on the button to do > so...that is just a guess. Those are just defining a servlet name and corresponding URL pattern. With that defined, the URL http://yourserver.com/SaveServlet should invoke the program located in com.ez_signature.signature named SaveServlet. > Here are the errors from the java console (this is the part that may as well be in Greek *grin*...the only thing I can gleen is that > the pathing may not be right, but as far as I can tell, everything is placed properly physically speaking.): ----- Excess quoted text cut - see Original Post for more ----- https://localhost/jobappl_qa/EzApplet/ezsign-applet.jar Does this URL resolve properly? It looks like you need a client-side applet to use this, and that the web server can't find it. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, on The url doesn't resolve unless I add that folder and put the jar files in the web root. Now correct me if I am wrong, but isn't Cf supposed to look in c:\CFusionMX\wwwroot\web-inf\lib for the jar files regardless if you are using the built in server or IIS/Apache? Eric ----- Excess quoted text cut - see Original Post for more ----- <servlet-class>com.ez_signature.signature.SaveServlet</servlet-class> ----- Excess quoted text cut - see Original Post for more ----- the signature image when you click on the button to do > so...that is just a guess. Those are just defining a servlet name and corresponding URL pattern. With that defined, the URL http://yourserver.com/SaveServlet should invoke the program located in com.ez_signature.signature named SaveServlet. > Here are the errors from the java console (this is the part that may as well be in Greek *grin*...the only thing I can gleen is that > the pathing may not be right, but as far as I can tell, everything is placed properly physically speaking.): ----- Excess quoted text cut - see Original Post for more ----- https://localhost/jobappl_qa/EzApplet/ezsign-applet.jar Does this URL resolve properly? It looks like you need a client-side applet to use this, and that the web server can't find it. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, on > The url doesn't resolve unless I add that folder and put the jar files in > the web root. Now correct me if I am wrong, but isn't Cf supposed to look > in c:\CFusionMX\wwwroot\web-inf\lib for the jar files regardless if you are > using the built in server or IIS/Apache? Yes, for servlets, but this includes an applet run through the browser. So you need to make that available to the browser. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite OK...so I added the directory to the actual web root and now I get the following error: Java Plug-in 1.6.0_18 Using JRE version 1.6.0_18-b07 Java HotSpot(TM) Client VM User home directory = C:\Documents and Settings\Administrator ---------------------------------------------------- c: clear console window f: finalize objects on finalization queue g: garbage collect h: display this help message l: dump classloader list m: print memory usage o: trigger logging q: hide console r: reload policy configuration s: dump system and deployment properties t: dump thread list v: dump thread stack x: clear classloader cache 0-5: set trace level to <n> ---------------------------------------------------- basic: Added progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@6355dc basic: Applet loaded. basic: Applet resized and added to parent container basic: PERF: AppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch dt 657965 us, pluginInit dt 229256641 us, TotalTime: 229914606 us network: Cache entry not found [url: https://localhost/jobappl_qa/EzApplet/ezsign-applet.properties, version: null] network: Connecting https://localhost/jobappl_qa/EzApplet/ezsign-applet.properties with proxy=DIRECT network: Connecting http://localhost:443/ with proxy=DIRECT network: Connecting https://localhost/jobappl_qa/EzApplet/ezsign-applet.properties with cookie "CFID=200; CFTOKEN=80699936; JSESSIONID=1030f248a0dd$CF$8C$F" basic: Removed progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@6355dc java.lang.SecurityException: Unauthorized Applet Use! at com.ez_signature.signature.Sign.init(Sign.java:61) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Exception: java.lang.SecurityException: Unauthorized Applet Use! Ignored exception: java.lang.SecurityException: Unauthorized Applet Use! basic: Applet initialized basic: Starting applet basic: completed perf rollup basic: Applet started basic: Told clients applet is started ----- Excess quoted text cut - see Original Post for more ----- <servlet-class>com.ez_signature.signature.SaveServlet</servlet-class> ----- Excess quoted text cut - see Original Post for more ----- the signature image when you click on the button to do > so...that is just a guess. Those are just defining a servlet name and corresponding URL pattern. With that defined, the URL http://yourserver.com/SaveServlet should invoke the program located in com.ez_signature.signature named SaveServlet. > Here are the errors from the java console (this is the part that may as well be in Greek *grin*...the only thing I can gleen is that > the pathing may not be right, but as far as I can tell, everything is placed properly physically speaking.): ----- Excess quoted text cut - see Original Post for more ----- https://localhost/jobappl_qa/EzApplet/ezsign-applet.jar Does this URL resolve properly? It looks like you need a client-side applet to use this, and that the web server can't find it. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, on Unauthorized Applet Use is almost assuredly a java security policy error. You'll need to use the PolicyTool to create a policy file that will reside in your user.home directory that specifies that this applet codebase can do what it wants to do, which is probably to access your system hardware. Judah ----- Excess quoted text cut - see Original Post for more ----- Thanks...why do they make this so difficult? What app are you guys using? Eric Unauthorized Applet Use is almost assuredly a java security policy error. You'll need to use the PolicyTool to create a policy file that will reside in your user.home directory that specifies that this applet codebase can do what it wants to do, which is probably to access your system hardware. Judah ----- Excess quoted text cut - see Original Post for more ----- We are using the Topaz capture devices and then wrote an applet ourselves to use the Topaz Java drivers. That way we can expose the Java functions for starting/stopping/clearing/capturing via JS and integrate it into our web-based app. As to why they make it so difficult, well, Java has a fairly robust security model and the whole Applet system was set up, originally, to do a very good job of separating the code that would execute in your browser from the rest of the OS, much like how Flash wasn't able to really talk to your computer at all for a long time. This has the upside of not having the same gnarly security problems that ActiveX has had but has the downside of making it a pain in the ass to access anything outside the browser context. Cheers, Judah > > Thanks...why do they make this so difficult? What app are you guys using? > > Er I finally heard back from the company that makes this. Apparently I needed to put the properties file in the directory with the jar files in my web root. Putting these files in the lib and classes dirs in the CF wwwroot\web-inf dir doesn't work at all. Oy! Eric Unauthorized Applet Use is almost assuredly a java security policy error. You'll need to use the PolicyTool to create a policy file that will reside in your user.home directory that specifies that this applet codebase can do what it wants to do, which is probably to access your system hardware. Judah ----- Excess quoted text cut - see Original Post for more ----- >> java.io.FileNotFoundException: https://localhost/jobappl_qa/EzApplet/ezsign-applet.jar > > Does this URL resolve properly? It looks like you need a client-side > applet to use this, and that the web server can't find it. We've been working with a (different) signature capture applet as well and one thing I'll mention that has caused us problems is that the applet needs proper security permissions in order to access the system hardware (COM ports and the like). If you do not have the correct java security policy file in place, you'll get completely spurious errors from the applet like "FileNotFoundException" in spite of the fact that the jar file is being found. Judah
|
March 22, 2010
|
Latest Fusion Authority Articles
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||