Questions tagged [ocpsoft-rewrite]

An open source Routing and URL Rewriting solution for Servlet, Java Web Frameworks, and Java EE.

Ocpsoft Rewrite is an open source, filter-based Servlet extension for Java –- enabling creation of bookmark-able, pretty URLs. Rewrite solves the “RESTful URL” problem elegantly, including features such as: page-load actions, managed parameter parsing, seamless integration with CDI, Spring, and configuration-free compatibility with other web frameworks.

18 questions
3
votes
2 answers

URL rewriting with OcpSoft rewrite Join.path rule

I'm using Ocpsoft Rewrite, to perform URL rewriting in a JSF project. I have a redirect rule, which works fine: .addRule() .when(Direction.isInbound().and(Path.matches("/venue/{id}"))) …
user473453
  • 894
  • 2
  • 11
  • 23
2
votes
1 answer

With ocpsoft rewrite in java remove .xhtml extension

I have this rewriteconfiguration: return ConfigurationBuilder.begin() .addRule(Join.path("/admin/users").to("/admin/users.xhtml")) .addRule(Join.path("/admin/test").to("/admin/test.xhtml")) …
Wesley Egbertsen
  • 720
  • 1
  • 8
  • 25
2
votes
1 answer

WebFilter and RewriteConfiguration conflict

So I have this RewriteConfiguration: @RewriteConfiguration public class ApplicationConfigurationProvider extends HttpConfigurationProvider { /** * Set the forwarding rules * @param context * @return The forwarding rules */ …
Wesley Egbertsen
  • 720
  • 1
  • 8
  • 25
2
votes
0 answers

Runtime rewriting with ocpsoft rewrite - Java

I'm developing a web application that provides some pages. I require to rewrite the URL of these pages and I would like to use this framework http://ocpsoft.org/rewrite. All works fine, but the problem is that I need invoke the configuration in a…
Andrea Catania
  • 1,361
  • 3
  • 21
  • 37
2
votes
2 answers

OCPsoft Rewrite Rule no longer works after Update from 1.0.5 to 1.1.0

When updating OCPsoft Rewrite from Version 1.0.5.Final to 1.1.0.Final the following Rule no longer works and I don't know how to fix it: .addRule( Join.path("/{i}/{d}") .where("i").matches("[-_a-zA-Z0-9~*]{8}") …
Jack
  • 1,881
  • 24
  • 29
1
vote
1 answer

How to map undefined amount of path parameters to request parameters in Ocpsoft Rewrite?

Currently I´m trying the following JSF - Lib: https://www.ocpsoft.org/rewrite/examples/ I have the following issue: I have a page: /page.jsf In my page I have more then only one parameter. E.g. I have: - parameter1 - parameter2 String parameter1 =…
vished2000
  • 164
  • 1
  • 11
1
vote
1 answer

OCPSoft Rewrite - Response already committed error

I’m new to Rewrite and I’m just trying to make my test application work with it using simple redirect rules. But for every redirect event I’m getting “Response already committed” error in log, in spite of redirect works well and I can see target…
Ultranium
  • 332
  • 2
  • 19
1
vote
1 answer

Ocpsoft Rewrite JSF subdomain

I want to create the following scenario: 1. Step: Login page: The user will login into the web portal. Each user has an username. For example tester12345. This username is stored in the database. 2. Step: After the redirect from the login page, all…
internet
  • 385
  • 1
  • 8
  • 27
1
vote
1 answer

ocpsoft rewrite one variable twice use

I want to rewrite my urls like this: /admin/ -> /admin/admin.xhtml I wrote this code: return ConfigurationBuilder.begin() .addRule(TrailingSlash.append()) .when(Path.matches("/{page}")) …
acpuma
  • 479
  • 5
  • 15
1
vote
1 answer

ocpsoft rewrite ConfigurationProvider Registration fails

I want to use ocpsoft rewrite in order to overcome proxy issues with Richfaces. Since the JavaScript files could not be found through a proxy configuration (similar to the problem described in JSF. URL rewriting solution needed). Somehow I do not…
0
votes
0 answers

Opcsoft Rewrite: redirect to subdomains / custom portal

I´m trying to do the following scenarios: In my app I have an entity like "CustomerPortal". A user from my app can have a customer portal which has an ID. myapp.com/portal/customerportal?id=123456 -> This is than the customer portal from User1. My…
vished2000
  • 164
  • 1
  • 11
0
votes
1 answer

JSF - forwarded URL with proxy lost

When using an apache proxy against our glassfish 5 the forwarded URL data are lost. This happens within our login @WebFilter and can be reproduced using a simple ajax page update with an
djmj
  • 5,579
  • 5
  • 54
  • 92
0
votes
1 answer

JSF - ignore case in URLs (OCPSoft)

Is there a way to define rewrite rules in OCPSoft rewrite independent of case instead of defining multiple rules, since any character could be lower or upper…
djmj
  • 5,579
  • 5
  • 54
  • 92
0
votes
1 answer

JSF - How to migrate URLs by intercepting and redirecting potential 404 errors?

When migrating websites often dead URLs happen since old website used different URL structure or technology. Correct 301 "permanent" redirect is important for SEO friendly migrations. Example: Old page…
djmj
  • 5,579
  • 5
  • 54
  • 92
0
votes
0 answers

Serving jsf page/resources from WEB-INF

I understand that one of the ways to serve jsf page/resource from any location is via RequestDispatcher#forward() for example response to http://domain/contextpath/someotherlink.xhtml can be mapped /WEB-INF/serving.xhtml resource location with…
1
2