|
Comments
Did you read today's front page stories & breaking news?
SYS-CON.TV
|
ColdFusion News Desk Extending ColdFusion with Java Servlets and JRun
Extending ColdFusion with Java Servlets and JRun
By: Edwin Smith
Jul. 23, 1999 12:00 AM
The ColdFusion Markup Language is the easiest way to generate dynamic Web content from a database. Its tag-based scripting commands are simple for HTML authors to learn, yet powerful enough for building full-featured Web applications. Custom ColdFusion tags can be developed in either CFML or C++ using the CFX plug-in API. Java servlets are becoming the most effective way to build server-side Web plug-ins. Because servlets are written in Java, they can run just about anywhere and connect to nearly anything. They're faster than CGI scripts and easier to write than native platform plug-ins such as Microsoft's Internet Server API (ISAPI), Netscape's Server API (NSAPI) and CFX. You can write entire applications with servlets or use them as "web glue" to "webify" anything from a printer to a mainframe. JRun is the award-winning, industry-leading servlet engine for developing and deploying Java servlets. It's an easy-to-use Web server plug-in that allows you to deploy Java servlets and JavaServer Pages (JSP). JRun was developed by Live Software, which was recently acquired by Allaire Corporation. For more information on JRun and to download a free copy visit www.livesoftware.com. With a few simple examples this article will demonstrate how easy it is to invoke Java servlets within your CFML pages using JRun.
CF_SERVLET For example, let's say we want to invoke JRun's EmailLiteServlet (included in the JRun Servlet Pack One) to send an e-mail after a form submission. Using NCSA-style Server Side Includes (SSI), the invocation would look as follows:
<SERVLET CODE=EmailLiteServlet>
<CF_SERVLET CODE=EmailLiteServlet By default, CF_SERVLET connects to a JRun running on the same machine as ColdFusion. Since JRun's proxy protocol is TCP/IP based, however, you can invoke servlets anywhere you have a JRun, even through a firewall. The following code shows using the JRUNPROXY attribute to access a JRun running on the MyServer.com host: <CF_SERVLET CODE=MyCoolServlet JRUNPROXY=MyServer.com:8081 Cool="you bet"> Because you're still running inside a ColdFusion page, you can even dynamically choose where to connect to JRun. For example, the user could enter it in a form field:
<CF_SERVLET CODE=RenderNewDo
How It Works: CFX_JRUN
What About <CF_Anywhere>?
Pricing Information
Conclusion Reader Feedback: Page 1 of 1
Latest Cloud Developer Stories
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
|
SYS-CON Featured Whitepapers
Most Read This Week
Breaking Cloud Computing News
|
|||||||||||||||||||||||||||||||||||||||||||||||||