4 Replies Latest reply on Aug 15, 2006 7:16 AM by Newsgroup_User

    Difficulty getting servlets working in CF7

      Hello all,

      Has anybody had a successful experience deploying servlets on Coldfusion 7 ? I've compiled my servlet, tested it worked successfuly with Tomcat, so the servlet works. However I can't get it running on CFMX 7, even if I recompile with jrun.jar in the classpath.

      I've been trying to get it working using the built-in HTTP server so that any third-party server issues are eliminated.

      I can't see what I'm doing wrong, I've got the classes in wwwroot\WEB-INF\classes and have edited wwwroot\WEB-INF\web.xml and simply pasted in the "known-good" <servlet> and <servlet-mapping> entries from the Tomcat implementation, as below :

      <servlet>
      <servlet-name>myServletName</servlet-name>
      <servlet-class>myClass.myServletName</servlet-class>
      </servlet>
      <servlet-mapping>
      <servlet-name>myServletName</servlet-name>
      <url-pattern>/servlets/myServletName</url-pattern>
      </servlet-mapping>

      Other things I have tried include :
      (1) Trying to use the default-web.xml parser (i.e. accessing /servlet/myServletName, either with or without the web.xml config above)
      (2) Following the syntax in web.xml, I tried adding "id="myname01"" to both the <servlet> and <servlet-mapping> tags.

      Any ideas ??