Oracle Rest Data Service (ORDS) URL link

无人久伴 提交于 2019-12-12 04:15:14

问题


I have installed ORDS 3.0 on Centos 7 and using it in standalone mode, but I am currently having two issues:

  • The URL contains /ords, e.g.: http://localhost/ords. I want to change it to /apex instead. I have tried renaming ords.war to apex.war, but the URL hasn't changed.

  • I am unable to start ORDS at system boot. I have created a systemctl service for it, but ORDS stops after starting.


回答1:


The specific version of ORDS can be important, things do change quite a bit from version 3.0 to 3.9 for example.

However...

Starting ORDS in your init tab scripts is pretty much like anything else, you should be able to nohup it and redirect the output to a log file. If you're doing this, what's the log file showing, WHY is it stopping after it starts?

And the URL's - since you're running ORDS in standalone mode, you can take advantage of the embedded Jetty webserver that's being used.

That means you can config how URI's are rewritten. Kris has an example of how to do this here.

How to map /catalog to /ords/klrice/metadata-catalog/

<Call name="addRule">
         <Arg>
           <New class="org.eclipse.jetty.rewrite.handler.RewritePatternRule">
             <Set name="pattern">/catalog</Set>
             <Set name="replacement">/ords/klrice/metadata-catalog/</Set>
           </New>
         </Arg>
       </Call>
</Ref>


来源:https://stackoverflow.com/questions/43568837/oracle-rest-data-service-ords-url-link

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!