1
我在Mac上爲開發環境設置Lucee時遇到了一些麻煩。 Lucee正在運行,因爲我能夠啓動服務器管理頁面,但我的開發站點都不會處理CFML。我已經將這些網站添加到了Tomcat server.xml文件中,因此它可以爲它們提供服務,但Lucee似乎並不知道它們在那裏。我需要做些什麼來告訴Lucee這些網站?在Tomcat上將Lucee設置爲Mac OS X上的開發環境
我在Mac上爲開發環境設置Lucee時遇到了一些麻煩。 Lucee正在運行,因爲我能夠啓動服務器管理頁面,但我的開發站點都不會處理CFML。我已經將這些網站添加到了Tomcat server.xml文件中,因此它可以爲它們提供服務,但Lucee似乎並不知道它們在那裏。我需要做些什麼來告訴Lucee這些網站?在Tomcat上將Lucee設置爲Mac OS X上的開發環境
最後事實證明,我需要將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>
你能告訴我們更多關於你的環境嗎?你是怎麼安裝Lucee的?除了Lucee,你還在使用網絡服務器嗎?你現在試圖訪問你的網站,他們現在已經在你的server.xml文件中列出了嗎? – Jordan
我終於找到了答案,因爲我需要用關於Lucee的信息來更新web.xml文件。這不在Lucee網站上的Mac設置說明中。 – unclesol