Running Servlets On ColdFusion
-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.
<title>This is a test CFM page calling a Servlet page</title>
<h1>This is a test CFM page calling a Servlet page named “testServlet”</h1>
-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)
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)