Tuesday, September 06, 2011

coldfusion: display 404 error instead of cf file not found error

to display apache's 404 error instead of coldfusion's file not found error:

coldfusion's file not found error message

edit  coldfusionmx/runtime/servers/default/SERVER-INF/default-web.xml

1. set keepGenerated to true:

 <servlet>
   <servlet-name>JSPServlet</servlet-name>
   <servlet-class>jrun.jsp.JSPServlet</servlet-class>
   <load-on-startup>1</load-on-startup>
   <init-param>
     <param-name>keepGenerated</param-name>
     <param-value>true</param-value>
   </init-param>
   <init-param>
     <param-name>translationDisabled</param-name>
     <param-value>false</param-value>
   </init-param>
   <init-param>
     <param-name>cacheTags</param-name>
     <param-value>true</param-value>
   </init-param>
 </servlet>


2. comment servlet mapping for jsplicenseservlet

<!--
 <servlet-mapping>
   <servlet-name>JspLicenseServlet</servlet-name>
   <url-pattern>*.jsp</url-pattern>
 </servlet-mapping>
-->


3. comment index.jsp in welcome-file-list

 <welcome-file-list>
  <welcome-file>index.html</welcome-file>
<!--
  <welcome-file>index.jsp</welcome-file>
-->
 </welcome-file-list>


edit your apache/httpd.conf

1. remove .jsp from AddHandler

No comments:

Post a Comment

SSH : No matching host key type found. Their offer: ssh-rsa,ssh-dss

Got this while connecting to my mikrotik router via ssh   Unable to negotiate with <ip address> port <ssh port>: no matching hos...