-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)
Running Servlets On ColdFusion
Join the DZone community and get the full member experience.Join For Free
Check out this 8-step guide to see how you can increase your productivity by skipping slow application redeploys and by implementing application profiling, as you code! Brought to you in partnership with ZeroTurnaround.