【问题标题】:Setting up Lucee as a dev environment on Mac OS X with Tomcat使用 Tomcat 在 Mac OS X 上将 Lucee 设置为开发环境
【发布时间】:2017-06-16 15:04:08
【问题描述】:

我在我的 Mac 上为开发环境设置 Lucee 时遇到了一些问题。 Lucee 正在运行,因为我能够打开服务器管理页面,但我的开发站点都不会处理 CFML。我已将站点添加到 Tomcat server.xml 文件中,因此它将为它们提供服务,但 Lucee 似乎不知道它们在那里。我需要做什么才能将这些网站告诉 Lucee?

【问题讨论】:

  • 您能告诉我们更多关于您的环境的信息吗?你是如何安装 Lucee 的?除了 Lucee,您还在使用 Web 服务器吗?既然您的网站已列在您的 server.xml 文件中,您将如何尝试访问它们?
  • 我终于找到了答案,因为我需要用有关 Lucee 的信息更新 web.xml 文件。它不在 Lucee 网站上的 Mac 设置说明中。

标签: macos tomcat osx-elcapitan lucee


【解决方案1】:

最后发现我需要将 Lucee 信息添加到 Tomcat web.xml 文件中。这不在 Mac OSX Lucee 设置文档中,但我在其他地方找到了它。这是需要的:

    <!-- ===================================================================== -->
<!-- Lucee CFML Servlet - this is the main Lucee servlet                   -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<servlet id="Lucee">
  <description>Lucee CFML Engine</description>
  <servlet-name>CFMLServlet</servlet-name>
  <servlet-class>lucee.loader.servlet.CFMLServlet</servlet-class>
  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!-- to specify the location of the Lucee Server config and libraries,   -->
  <!-- uncomment the init-param below.  make sure that the param-value     -->
  <!-- points to a valid folder, and that the process that runs Lucee has  -->
  <!-- write permissions to that folder.  leave commented for defaults.    -->
  <!--
  <init-param>
    <param-name>lucee-server-root</param-name>
    <param-value>/var/Lucee/config/server/</param-value>
    <description>Lucee Server configuration directory (for Server-wide configurations, settings, and libraries)</description>
  </init-param>
  !-->
  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!-- to specify the location of the Web Contexts' config and libraries,  -->
  <!-- uncomment the init-param below.  make sure that the param-value     -->
  <!-- points to a valid folder, and that the process that runs Lucee has  -->
  <!-- write permissions to that folder.  the {web-context-label} can be   -->
  <!-- set in Lucee Server Admin homepage.  leave commented for defaults.  -->
  <!--
  <init-param>
    <param-name>lucee-web-directory</param-name>
    <param-value>/var/Lucee/config/web/{web-context-label}/</param-value>
    <description>Lucee Web Directory (for Website-specific configurations, settings, and libraries)</description>
  </init-param>
  !-->
  <load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
  <servlet-name>CFMLServlet</servlet-name>
  <url-pattern>*.cfc</url-pattern>
  <url-pattern>*.cfm</url-pattern>
  <url-pattern>*.cfml</url-pattern>
  <url-pattern>/index.cfc/*</url-pattern>
  <url-pattern>/index.cfm/*</url-pattern>
  <url-pattern>/index.cfml/*</url-pattern>

  <!-- url-pattern>*.cfm/*</url-pattern !-->
  <!-- url-pattern>*.cfml/*</url-pattern !-->
  <!-- url-pattern>*.cfc/*</url-pattern !-->
  <!-- url-pattern>*.htm</url-pattern !-->
  <!-- url-pattern>*.jsp</url-pattern !-->
</servlet-mapping>

<!-- ===================================================================== -->
<!-- Lucee REST Servlet - handles Lucee's RESTful web services             -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<servlet id="RESTServlet">
  <description>Lucee Servlet for RESTful services</description>
  <servlet-name>RESTServlet</servlet-name>
  <servlet-class>lucee.loader.servlet.RestServlet</servlet-class>
  <load-on-startup>2</load-on-startup>
</servlet>

<servlet-mapping>
  <servlet-name>RESTServlet</servlet-name>
  <url-pattern>/rest/*</url-pattern>
</servlet-mapping>

【讨论】:

    猜你喜欢
    • 2010-09-20
    • 2023-03-17
    • 2017-07-08
    • 2013-11-27
    • 2011-11-22
    • 1970-01-01
    • 2012-03-15
    相关资源
    最近更新 更多