Hi List,
a question I have in mind since a long time: I have a Basex serving multiple project sites behind Nginx Redirections.
I wrote a servlet for 404 errors in web.xml:
<error-page>
<error-code>404</error-code>
<location>/error404</location>
</error-page>
and a function:
declare
%rest:path("/error{$code}") %output:method("html")
But if i try to get "http://www.bla.fr/xzxzxzxzxz", basex answers:
"No function found that matches the request."
How could I inhibit this behavior ?
thanks !
Hi,
how does your web.xml look like?
Like this:
<servlet-mapping> <servlet-name>RESTXQ</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping>
Because then every request is handled by the RESTXQ servlet only.
Br, Max
2017-10-12 18:41 GMT+02:00 Xavier-Laurent SALVADOR xavierlaurent.salvador@gmail.com:
Hi List,
a question I have in mind since a long time: I have a Basex serving multiple project sites behind Nginx Redirections.
I wrote a servlet for 404 errors in web.xml:
<error-page>
<error-code>404</error-code>
<location>/error404</location>
</error-page>
and a function:
declare
%rest:path("/error{$code}")
%output:method("html")
But if i try to get "http://www.bla.fr/xzxzxzxzxz", basex answers:
"No function found that matches the request."
How could I inhibit this behavior ?
thanks !
-- Ce message peut contenir des informations réservées exclusivement à son destinataire. Toute diffusion sans autorisation est interdite. Si vous n'en êtes pas le destinataire, merci de prendre contact avec l'expéditeur et de détruire ce message.
This email may contain material for the sole use of the intended recipient. Any forwarding without express permission is prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Hi,
Thanks Maximilian, that's it.
But I thought that the 404 error was handled by the RESTXQ servlet mapping to my "custom" function /errorXXX, no ? Reading your answer, I thought that my rest URL being the one causing the 404 problem, there was a kind of conflict with mapping to "/error" so I tried to map to an external URL, but it died.
I tried to remove the * after the "/" because I read that there was a priority system used by jetty, but obviously, that wan not smart.
Thank for helping !
2017-10-13 20:40 GMT+02:00 Maximilian Gärber mgaerber@arcor.de:
Hi,
how does your web.xml look like?
Like this:
<servlet-mapping> <servlet-name>RESTXQ</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping>
Because then every request is handled by the RESTXQ servlet only.
Br, Max
2017-10-12 18:41 GMT+02:00 Xavier-Laurent SALVADOR xavierlaurent.salvador@gmail.com:
Hi List,
a question I have in mind since a long time: I have a Basex serving
multiple
project sites behind Nginx Redirections.
I wrote a servlet for 404 errors in web.xml:
<error-page>
<error-code>404</error-code>
<location>/error404</location>
</error-page>
and a function:
declare
%rest:path("/error{$code}")
%output:method("html")
But if i try to get "http://www.bla.fr/xzxzxzxzxz", basex answers:
"No function found that matches the request."
How could I inhibit this behavior ?
thanks !
-- Ce message peut contenir des informations réservées exclusivement à son destinataire. Toute diffusion sans autorisation est interdite. Si vous
n'en
êtes pas le destinataire, merci de prendre contact avec l'expéditeur et
de
détruire ce message.
This email may contain material for the sole use of the intended
recipient.
Any forwarding without express permission is prohibited. If you are not
the
intended recipient, please contact the sender and delete all copies.
basex-talk@mailman.uni-konstanz.de