Ben Forta is Adobe Inc.'s Director of Platform Evangelism, and has over two decades of experience in the computer industry in product development, support, training, and marketing. Ben is the author of the best-selling ColdFusion Web Application Construction Kit series, as well as books on SQL, Regular Expressions, Java Server Pages, WAP, Windows development, and more. Over 1/2 million Ben Forta books have been printed in fifteen languages worldwide. Ben co-authored the official ColdFusion training material, as well as the certification tests and official study guides for those tests, writes regular columns on ColdFusion and Internet development, and now spends a considerable amount of time lecturing and speaking on application development worldwide. Ben is a DZone MVB and is not an employee of DZone and has posted 45 posts at DZone. You can read more from them at their website. View Full User Profile

Running Servlets On ColdFusion

07.18.2011
| 6464 views |
  • submit to reddit
ColdFusion Technical Support Engineer Vikas Chandran explains how to run Java servlets on ColdFusion.

TO TEST

-Create a cfm page and call the Servlet [in our case the servlet name is "testServlet"] with content.

note we are using “GetPageContext().forward(“testServlet”);”

to forward the request to the servlet.

<html>
<head>
<title>This is a test CFM page calling a Servlet page</title>
</head>
<body>
<h1>This is a test CFM page calling a Servlet page named “testServlet”</h1>
<cfscript>
GetPageContext().forward(“testServlet”);
</cfscript>
</body>
</html>

-Create a Servlet name it “testServlet.java” with content testServlet[please refer the code mentioned at the end]

once you have compiled the Servlet.

(continued through link)

References
Published at DZone with permission of Ben Forta, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Aiguo Bolin replied on Fri, 2011/08/12 - 6:16am

Hello

So what is  really all about? The following report includes some fascinating information about --info you can use, not just the old stuff they used to tell you.

 

Truthfully, the only difference between you and  experts is time. pass4sure 642-637 If you'll invest a little more time in reading, you'll be that much nearer to expert status when it comes to.

Dear i really want this kind of site. It is very handy pass4sure 642-062 and accommodating post. keep up the good work. We need more good statements. I really appreciate your way of presenting such an excellent suggestion. I want more pass4sure 000-977 and i will come back here to see more updates in future pass4sure JN0-101 as well. My best wishes for you always so keep it up.
 

Is there really any information about  that is nonessential? We all see things from different angles, so something relatively insignificant to one may be crucial to another.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.