Hi Geert,
Thanks!
Yeah, I guess adding it to the Wiki would be the next step. :)
Any suggestions on where I should put it?:
* Config
* Installation
* Preparing applications for Production
* [new location?]
Josh
--
Joshua Hansen
Up Bear Enterprises
(541) 760-7685 (new #)
Geert Bevin wrote:
Great write-up JOshua, thanks a lot!
Would you mind adding this to the wiki?
http://rifers.org/wiki/display/RIFE/Home
On 6-apr-06, at 09:39, Joshua Hansen wrote:
Hi all,
For anyone wanting to serve up a 404 (or 403, or other error response
page) from RIFE, here's how to do it:
0. Create your rife pages
1. Make sure you have a container that supports Servlet 2.4
2. Add <dispatcher>ERROR</dispatcher> to your filter-mapping for RIFE.
3. Add your error-page declarations which point to your RIFE pages.
4. Go get a [root] beer. :)
==[WEB-INF/web.xml]===============================================
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!-- Note: The xsi:schemeLocation has a space after ".../j2ee", and
"http://java...." is on the same line! It's just wrapping here. -->
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://
java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4"
>
<filter>
<filter-name>RIFE</filter-name>
<filter-class>
com.uwyn.rife.servlet.RifeFilter
</filter-class>
<init-param>
<param-name>rep.path</param-name>
<param-value>rep/participants.xml</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>RIFE</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>ERROR</dispatcher>
</filter-mapping>
<error-page>
<error-code>403</error-code>
<location>/403</location>
</error-page>
<error-page>
<error-code>404</error-code>
<location>/404</location>
</error-page>
</web-app>
=========================================================
==[participant sites file snippet]=======================
...
<element id="PAGE403" extends="rife/template/print.xml" url="/ 403">
<property name="name">403</property>
</element>
<element id="PAGE404" extends="rife/template/print.xml" url="/ 404">
<property name="name">404</property>
</element>
...
=========================================================
Requirements:
* A Servlet 2.4 compatible container (Tomcat 5.0+ and Jetty 5.1.4+
both work)
* 403 and 404 here are just RIFE templates with names '403.html' and
'404.html'
* Shouldn't be required, but FWIW, I'm using rife-1.3.1-jdk14.jar and
JDK1.5.
Other notes:
* If you'd like to use a jsp (or other servlet) to include or forward
requests to RIFE, you can add 'dispatcher' elements for INCLUDE and
FORWARD.
Reference:
Servlet 2.4 Specification (Final Release), Filtering SRV 6.2.5
"Filters and Requests"
http://jcp.org/aboutJava/communityprocess/final/jsr154/index.html
Josh
--
Joshua Hansen
Up Bear Enterprises
(541) 760-7685 (new #)
_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users
--
Geert Bevin Uwyn bvba GTalk: [EMAIL PROTECTED]
"Use what you need" Avenue de Scailmont 34 Skype: gbevin
http://www.uwyn.com 7170 Manage, Belgium AIM: geertbevin
gbevin at uwyn dot com Tel: +32 64 84 80 03 Mobile: +32 477 302 599
PGP Fingerprint : 4E21 6399 CD9E A384 6619 719A C8F4 D40D 309F D6A9
Public PGP key : available at servers pgp.mit.edu, wwwkeys.pgp.net
_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users
_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users