By Rupert
coldfusion
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
Test Driven Development using Test.AnotherWay and mxUnit
Mar 20th
Time and time again, I have debugging bugs and redeveloping code which some I wrote but mostly done by others as well. Experience is still my best teacher in web development and I believe it would be a heavier burden later on if we continuously pursue rapid development without any testing at all.
You may have heard of writing test cases before diving into code which is well known as Test Driven Development. This methodology has been widely adapted in programming (Java thru JUnit, etc). Following Kent Beck’s Test Driven Development (TDD) we will follow this simple method:
- Write the test first
- Watch the test fail
- Write the component
- Watch the test pass
Comments