2017-06-16 55 views
1

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

+0

你能告诉我们更多关于你的环境吗?你是怎么安装Lucee的?除了Lucee,你还在使用网络服务器吗?你现在试图访问你的网站,他们现在已经在你的server.xml文件中列出了吗? – Jordan

+0

我终于找到了答案,因为我需要用关于Lucee的信息来更新web.xml文件。这不在Lucee网站上的Mac设置说明中。 – unclesol

回答

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> 
相关问题