PacktLib: Railo 3 Beginner’s Guide

Railo 3

Credits

About the Authors

About the Reviewers

www.PacktPub.com

Preface

Introducing Railo Server

Why use Railo Server?

What does Railo Server do?

A better look at Railo Server

What else can you do with Railo Server?

Summary

Installing Railo Server

Getting up and running with Railo Express

Time for action - downloading Railo

Customizing Railo Express

Time for action - setting the administrator's password

Running the Railo Server Tomcat installer

Time for action - installing on Windows

Adding CFML-enabled sites to IIS7

Time for action - adding a site to IIS7

Getting up and running with the Railo WAR and Jetty

Time for action - downloading and installing Jetty

Time for action - booting up Jetty

Time for action - downloading and deploying the Railo WAR

Summary

CFML Language

Basics of the CMFL language

Time for action - Hello World!

CFML tags

Time for action - single tag example

CFML functions

Time for action - using built-in functions

Time for action - using user-defined functions

CFML variables

Time for action - using structures

Time for action - creating an array

CFML scopes

Time for action - adding a variable to the SERVER scope

Time for action - creating the APPLICATION scope

Time for action - creating a SESSION scope in your Application

Time for action - using the REQUEST Scope

Handling web data

Time for action - getting variables from the URL

Time for action - getting FORM variables

Database access

Time for action - installing MySQL and setting up our database

Time for action - configuring data sources in Railo Server

Time for action - running queries against our database

Time for action - calling stored procedures

Time for action - creating the Employee component

Summary

Railo Server Administration

Server and Web context

Time for action - setting up an example context

Time for action - setting your password

How contexts relate to each other

Time for action - setting the time zone

The Railo Web Administrator

Time for action - investigating the Web Administrator

Time for action - comparing template caching settings

Time for action - restricting the scoping of variables

Time for action - merging the URL and FORM scopes

Time for action - creating a search collection

Time for action - creating mappings in our application

Time for action - using magic functions

Time for action - setting the debug template

Summary

Developing Applications with Railo Server

Railo applications

Time for action - building the simplest application

Time for action - defining the application

Application events

Object relational mapping with Railo Server

Time for action - upgrading Railo Server

Creating our database persistence store

Time for action - creating a database

Time for action - creating our railoblog datasource

Using persistent components

Time for action - creating the blog

Time for action - listing our blog posts

Time for action - adding comments

Caching in Railo Server

Time for action - creating a cache connection

Time for action - using the Cache object

Time for action - getting well versed with more caching functions

Time for action - caching a page with cfcache

Time for action - caching content within a template

Time for action - caching a query using cachedwithin

Time for action - assigning an EHCache Lite connection to resources

Summary

Advanced CFML Functionality

Scripting within Railo Server

The tag

Time for action - looping through a list

Time for action - looping an array

Time for action - looping through a structure

Time for action - looping over queries

Time for action - creating the component

Time for action - getting the contents of another site

Time for action - using the tag in CFScript

Time for action - get a user by his/her ID

Time for action - using the Query component

Time for action - getting the content of a website via the HTTP component

Summary

Multimedia and AJAX

Video

Time for action - displaying a video player

Time for action - installing the Video Extension

Time for action - creating clips for our video player

Time for action - creating poster frames and clips

Time for action - adding a playlist to

AJAX functionality within the Railo server

Time for action - setting up the application and services

Time for action - binding the input to the component

Time for action - displaying the tasks

Time for action - deleting a task

Summary

Resources and Mappings

Railo resources

Accessing files locally

Time for action - writing and reading files

Looping files

Time for action - looping through the contents of a file

Mappings

Time for action - creating a mapping for the log file

Accessing code from mappings

Time for action - creating our components

Railo archives

Time for action - creating a Railo archive

Mappings and their settings

Time for action - changing the settings of a mapping

Accessing your files from ZIP and TAR files

Time for action - accessing files from a ZIP file

Using RAM as a quick location to store files

Time for action - compiling plain text to CFML

Using Amazon's Simple Storage Service to use files in the Cloud

Time for action - using Amazon's Simple Storage Service (S3)

Summary

Extending Railo Server

Why create your own CFML tags and functions?

Time for action - creating our own CFML tag

Time for action - creating our own CFML function

Installing extensions

Time for action - installing an extension for the web context

Time for action - installing the Galleon forums web application

Time for action - creating our own Railo application extension

Time for action - creating our own extension provider

The Railo Extension Store

Summary

Creating a Video-sharing Application

VideoShare: Getting to know our application

Goals of the application

Creating our application

Time for action - creating our basic application

Laying it all out

Time for action - creating the layout custom tag

Registering users

Time for action - creating our user model object

User login and logout

Time for action - log in or log out of the application

Uploading videos

Time for action - uploading a video

Adding security

Time for action - adding the secure tag

Assigning videos to users

Time for action - storing our video to the database

Converting and playing videos

Time for action - converting the uploaded video

Creating thumbnails for our videos

Time for action - creating images from a video

Adding comments to our video page

Time for action - adding comments to our videos

Creating the home page

Time for action - getting the latest videos

Summary