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?


On Mon, Feb 8, 2010 at 10:13 AM, Eric Roberts <[email protected]> wrote:

>
> 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>
>
>
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330473
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to