- 197K All Categories
- 2.5K Data
- 546 Big Data Appliance
- 1.9K Data Science
- 450.8K Databases
- 221.9K General Database Discussions
- 31 Multilingual Engine
- 552 MySQL Community Space
- 479 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3.1K ORDS, SODA & JSON in the Database
- 556 SQLcl
- 4K SQL Developer Data Modeler
- 187.2K SQL & PL/SQL
- 21.4K SQL Developer
- 296.4K Development
- 17 Developer Projects
- 139 Programming Languages
- 293.1K Development Tools
- 110 DevOps
- 3.1K QA/Testing
- 646.1K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 161 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.2K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 19 Java Essentials
- 162 Java 8 Questions
- 86K Java Programming
- 81 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 205 Java User Groups
- 474 LiveLabs
- 39 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 175 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 233 Portuguese
Use of ORDS Plugin API to implement a filter
We have a simple requirement to slightly manipulate the inbound HTTP POST parameters that come into a ORDS standalone instance. The reason is that we have had to migrate from mod_plsql over to ORDS and found a specific scenario in our ageing application where a form post doesn't match the POST params the same way to the PLSQL function inputs... We are trying to avoid redeveloping the thousands of forms that use this type of post.
We identified that Oracle provide the ability to create and load a plugin in which we have successfully been able to add a java filter to intercept the request.
BUT.. (I wouldn't be here if there wasn't a but... )... even though we are modifying the inbound POST variables they do not seem to be being passed through to the PLSQL modified.
I am wondering if anyone has ever done this before?? Oracle support say "the custom plugin and filter related issues are best addressed in community. If it is documented mean it should work".... so here I am.. I have SR 3-29801050661 raised.
Here are some more details:
the guide states under Extension points "Plugins can plug in additional logic at the following extension points: Manipulating HTTP requests and responses by implementing the servlet Filter interface."
I implemented a filter to alter the HttpServletRrequest to resolve the issue using the @Provides(Filter.class) and @Priority(ring = FilterOrder.STREAMING, value = 50) annotations.
The filter jar was built and installed with the "plugin" command and logging confirmed the filter was called and altered the request as expected.
Note: I tried altering the request in 3 different ways (HttpServletRequestWrapper, Proxy and introspection editing of immutable private request data), but none of the variants worked.
Eventually I debugged- to view the request entering ModApex.handleRequest() and despite my filter being executed and the order of calls being as expected the request passed to ModApex was a completely different (and unchanged) instance from that passed to and returned from the filter.
So the question: is there something else I need to configure so the pl/sql gateway gets the filtered request, or is there another supported way of doing this, or can they fix this behaviour.
1. why does the request object instance passed to the filter (and passed along by the filter) get seen by all other filters, but NOT by the ModApex pl/sql gateway which seems to get a completely separate instance without the changes?
2. is there some special config we are missing that would allow it to work?