By Rupert
Posts tagged coldfusion
ColdFusion Fonts
Oct 8th
I was trying to make a chinese text drawn in an image. That worked flawlessly on my Mac. Upon svn updating my files in production, the characters in the image became squares again.

First hunch was to change my file.encoding as from my previous post. But didn’t helped, so I changed the font from the CF code itself..
<cfset attr = StructNew() /> <cfset attr.size = 16 /> <cfset attr.style = "plain" /> <cfset attr.font = "microsoft yahei" />
I noticed that using the obvious fonts (Arial, Tahoma) didn’t worked. It always complained it can’t find the font…

I remember using msyh.ttf (Microsoft Yahei) in Mapserver for producing Chinese text. So what I did was, I copied msyh.ttf and dropped it in the coldfusion fonts directory (/opt/coldfusion8/runtime/jre/lib/fonts) then restarted coldfusion. Afterwards, I was able to see msyh.ttf from the Font Management of CFIDE Administrator. From there… I was able to display the image with Chinese Characters..

ColdFusion: Specifying -Dfile.encoding
Sep 22nd
I have a small project to use a jar file for sending/receiving SMS in chinese. I could send the SMS fine from Eclipse, so I thought creating a Java Class wrapper to be used by ColdFusion so it can be called from HTTP could do the trick.
After a few minutes, I have the class up and running and fully tested within Eclipse.
1. I dropped the class, dll and its jar in C:\ColdFusion8\lib. Take note its a Windows box, since the Jar is using a dll to talk to the Wavecom modem using AT commands.
GSMModem.jar
GSMMultiPort.dll
GSMMultiPortForJ.dll
2. The crux was to specify the file.encoding for Java as an argument from the CFIDE Administrator. After specifying GB18030, a quick restart.. voila..
Java Version 1.6.0_01 Java Vendor Sun Microsystems Inc. Java Vendor URL http://java.sun.com/ Java Home C:\ColdFusion8\runtime\jre Java File Encoding GB18030 Java Default Locale en_US File Separator \ Path Separator ; Line Separator Chr(13) User Name SYSTEM User Home C:\
Files:
CFSend.java
Installing ColdFusion8 on Tomcat6
Jun 7th
Tomcat Install:
http://neilang.com/entries/how-to-install-tomcat-on-mac-os-x/
1. download tomcat http://tomcat.apache.org/
2. By default, MacOSX already has java in /Library/Java/Home
3. extract apache-tomcat-6.0.16.tar.gz
4. mv apache-tomcat-6.0.16 /usr/local/tomcat
5. cd /Library/StartupItems
6. sudo mkdir Tomcat
7. sudo vim tomcat
Deploying coldfusion as a war
http://www.adobe.com/support/coldfusion/j2ee/cfmx7j2ee_tomcat_deploy.html
8. When prompeted: Select J2EE configuration/WAR file
9. Copy cfusion.war to /usr/local/tomcat/webapps/
It should be automatically deployed, if not, then stop start tomcat
10. move tools.jar tools.old
11. Download the jce security and replace the files from your jdk directory
Post Install Apache2.x, ColdFusion 8
May 28th
After binding Apache2.x and ColdFusion 8, I find it very useful to follow the post-install instructions below:
1. Copying ColdFusion Admin directory to /wwwroot (webroot)
# ln -s /var/www /wwwroot # cp -Rf /opt/coldfusion8/wwwroot/CFIDE /wwwroot/ # rm /wwwroot/index.html # cd /wwwroot # ln -s CFIDE cfide
2. Adding index.cfm to DirectoryIndex.
# vim /etc/apache2/mods-available/dir.conf
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm index.cfm3. Restart apache
/etc/init.d/apache2 stop /etc/init.d/apache2 start
4. Browse Admin page for the first time
Installing Apache2.2 ColdFusion8 on Mac OS X Leopard
May 7th
Ok so this post is a bit late as I saw it in my drafts, but better late than never. I did these even before I wrote the PostGres8.3/Postgis/pgRouting post.
1. Apache
reference: http://httpd.apache.org/
./configure –prefix=/usr/local/apache2 –with-m2m=prefork
make
sudo make install
- To start on boot, download apache2startup.tar.gz and extract to your /Library/StartupItems/
2. ColdFusion
- run the installer as you would normally do in any windows/linux installation. I would suggest you put your installation in /opt and not ~ (home) because Leopard might wipe it out when upgrading to a higher OS version.
- should automatically start on boot
- bind coldfusion to apache
- Just in case you need to start it on boot, download coldfusion8Startup.tar.gz
3. Installing mod_python on Apache
$ ./configure –with-apxs=/usr/local/apache2/bin/apxs
$ make
$ sudo make install
Comments