Rewrite API or documentation

Splash Forums Rewrite Users Rewrite API or documentation

Tagged: 

This topic contains 21 replies, has 3 voices, and was last updated by  Kalpana 4 years, 10 months ago.

Viewing 15 posts - 1 through 15 (of 22 total)
  • Author
    Posts
  • #18475

    Kalpana
    Participant

    I need access to Rewrite API or documentation as i am implementing Rewrite in my project. And i need to understand clearly what API does instead just make it work somehow by trial.

    #22712

    Hi,

    unfortunately there isn’t current much documentation. But you could have a look at these examples:

    Rewrite Examples

    There are also some example applications on GitHub:

    https://github.com/ocpsoft/rewrite/tree/master/showcase

    The Javadocs are deployed with the artifacts to the Maven repository. So you should be able to get the Javadocs using your IDE very quickly.

    Christian

    #22713

    Kalpana
    Participant

    Hi,

    I need to know that how can we stop the request from rendering the next resource there itself where a rule definition fails.

    In my case, I have defined three rules and if one of those rules gets failed, still the next page gets rendered.

    #22714

    Hi,

    You might want to look at the Lifecycle.abort() Operation.

    :)

    Hope this helps,

    Lincoln

    #22715

    Kalpana
    Participant

    We are using Rewrite to prevent XSS attack by checking POST and GET params. What other features of Rewrite are available which we can be useful?

    #22716

    Kalpana
    Participant

    I need to know that is there any way to match RequestParameter name case insensitively.

    Below is the code where I need to implement this.

    .and(RequestParameter.matchesAll(“{name}”.toLowerCase(), “{value}”)

    .where(“name”).matches(inputParam)

    #22717

    You could simply add (?i) in front of the pattern to switch to case-insensitive mode when evaluation the regular expression. I guess this should work.

    #22718
    #22719

    Kalpana
    Participant

    I am using rewrite-servlet-1.0.5.Final.jar. So want to confirm that we are using OCPSoft Rewrite is it Beta version or production version? If Beta then when do you plan to launch production version?

    #22720

    The current version of Rewrite is a “.Final” version. So you can consider it stable.

    #22721

    You could also use a Transformer to force the values into a specific case:

    .and(RequestParameter.matchesAll(“{name}”, “{value}”)

    .where(“name”).transformedBy(ToLowerCase.class).matches(inputParam)

    #22722

    Kalpana
    Participant

    Is Rewrite Open source?

    #22723
    #22724
    #22725

    :)

Viewing 15 posts - 1 through 15 (of 22 total)

You must be logged in to reply to this topic.

Comments are closed.