OCPSoft Rewrite together with Tapestry 5

Splash Forums Rewrite Users OCPSoft Rewrite together with Tapestry 5

This topic contains 3 replies, has 2 voices, and was last updated by  Lincoln Baxter III 9 years, 8 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #18326



    I am planning on developing a Tapestry 5 website and I need a reliable url-rewriting library.

    I am just wondering what could be the pros and cons of using Ocpsoft Rewrite library against using T5 built-in rewrite api?

    see: http://blog.tapestry5.de/index.php/2010/09/06/new-url-rewriting-api/

    Any idea whether T5 built-in api might get in the way of OCPSoft Rewrite? Especially considering there might be as many as three servlet filter eventually.

    1. <filter-class>org.apache.tapestry5.spring.TapestrySpringFilter</filter-class>

    2. <filter-class>org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter</filter-class>

    3. Ocpsoft rewrite servlet filter.

    Which order should I choose for my servlet filters if it matters at all?



    P.S. I was initially planning on using Vaadin or GWT but I decided against it due to GWT’s poor SEO capabilities.


    While I haven’t tried Rewrite with tapestry before, I would suggest placing the RewriteFilter first in the chain (in other words, make Rewrite the outer-most filter.)

    And yeah – GWT takes extra work to do SEO. I’m hoping that our rewrite extension can help make this simpler via using crawler agent detection.



    Hello Lincoln!

    How do I make Rewrite the outer-most filter bearing in mind the rewrite filter is configured in a web-fragment and it is not mentioned in my app’s web.xml.

    Any idea?




    Hey Julien,

    Sorry for the late reply. You can simply override the order by re-defining the filter mapping in your application’s web.xml, but it should already be outer-most:

    This is the web-fragment.xml from Rewrite:

    <?xml version="1.0" encoding="UTF-8"?>
    <web-fragment xmlns="http://java.sun.com/xml/ns/javaee"

    <name id="rewrite">com_ocpsoft_rewrite</name>
    <distributable />

    <others />



    <filter-name>OCPsoft Rewrite Filter</filter-name>
    <filter-name>OCPsoft Rewrite Filter</filter-name>


Viewing 4 posts - 1 through 4 (of 4 total)

The forum ‘Rewrite Users’ is closed to new topics and replies.

Comments are closed.