I would like add a redirection of the KNIME homepage server if a file is missing in a local directory. I saw it is possible to use instructions like RewriteCond and RewriteRule with Tomcat to check a condition and redirect the user if needed (like A Brief Look at the Rewrite Valve in Tomcat 8 - A Blog By Tony Junkes).
So I added <Valve className="org.apache.catalina.valves.rewrite.RewriteValve" /> in <Host appBase="webapps"../> part of the KNIME server apache-tomcat-9.0.36/conf/server.xml file, and added a rewrite.config file in apache-tomcat-9.0.36/webapps/knime/WEB-INF. But it seems never read, I tried to put in in other folder but there is no change.
Do you know if it is possible to use a rewrite.config file to redirect KNIME homepage ?
When you say âwhen a file is missing in a local directoryâ can you explain in more detail what you mean? Maybe expand on the overall use case on what you want the user experiene to be, and we can try and figure out how it would work within KNIME.
Here is my use case: To access to a KNIME webportal, the users have to Login first to be authentifiate. The user authentication and authorization are managed by a custom Java security module using a remote database with web services (JAAS Implementation in apache-tomcat configuration).
Everything is fine with this authentification, but sometimes we may have network issues and so the users cannot access server authentification (in this case there is a âLogin failed. Please try again.â error message if users try to log in to the KNIME server homepage). My goal is to check if the remote database for authentification is available before user connection, and redirect the homepage to an error page if services are not ready.
For that, I think:
Step 1: Use a script to check regularly if this database is accessible, to write a file in KNIME apache-tomcat directory if the service is down.
Step 2: if this file is absent then continue the authentication as usual, but if this file exists (means that the auth service is down) then redirect the user to an error page.
This topic is for the step 2, I saw that it is possible to check and redirect web page if a local file exists with Tomcat 8 RewriteCond and RewriteRule instructions but I havenât found how to use it with our KNIME server. I tried to use rewrite.config file with these instructions but it never seems to be used.
Do you know how I could redirect the homepage in this case?