In my spring application after upgrading to tomcat8 response header location is become relative path. Can i know which file should i config for changing it back to absolute path.
As we are using nginx server and alb in our application. relative path response returning 404 page in nginx url were it is working fine in alb .
Set <Context useRelativeRedirects="false"> in context.xml of tomcat folder.
Reference :
https://tomcat.apache.org/tomcat-8.5-doc/config/context.html
Related
I load a local html file from my windows 7 filesytem :
file:///C:/Users/...etc.../myfile.html
Inside it, an existent file relative to the directory of myfile.html :
....load("../common/events.json");
Firefox refuses it, error at console :
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote
resource at file:///C:/Users/...etc.../common/events.json?timeshift=-60. (Reason: CORS request not http).
With link : https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSRequestNotHttp
So I set privacy.file_unique_origin to false in config and restarted Firefox : same issue
NB all is ok with ... IE 11 !
You could start your own local server:
python3 -m http.server
which tells you the port (e.g. Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/)).
Then something enter in browser address bar something like
http://0.0.0.0:8000/C:/Users/...etc.../myfile.html.
The path is relative to the location where the server was started.
The security feature you disabled only blocks accessing files in the same or lower directory as the HTML document.
Accessing files is other directories (i.e. if your relative path starts with ../ or you use an absolute path) is always forbidden.
I have a template which uses a keystore. locally, i just point it to my folder and it works. On the cloud, it doesnt seem to be working. i placed the keystore (jks) object under home/ec2-user/FUTBIN.jks . i did chmod777 on home , home/ec2-user and home/ec2-user/FUTBIN.jks .
I also placed the keystore on AWS S3 which has the same symptoms. Uploading the sql JDBC driver on S3 works without any problem
Please find screenshot attached of nifi controller config and error
When you are running NiFi on a Linux file system, I believe you need a leading slash ('/') to indicate an absolute path from the root of the file system, like /home/ec2-user/FUTBIN.jks. Without the leading slash for the root, it is interpreted relative to the NiFi process directory.
Changing directory to /opt/ worked correctly.
I have written Ignite hello world program in Eclipse and want to connect it to localhost(127.0.0.1). But it is giving me error for example "ignite.xml file path is invalid"
I am starting ignition as follows,
try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {}
But I got error like:
Spring XML configuration path is invalid: examples/config/example-ignite.xml.
How do I fix it?
You have the following options:
Provide the absolute file path.
Set IGNITE_HOME system property or environment variable, put the file in this folder and provide the path relative to the home.
Add the configuration file on classpath under META-INF and provide the path relative to it.
The last option is usually the most convenient for the applications with an embedded Ignite node.
I have an html file in my app root folder, which is located under webapp tomcat folder: apache-tomcat-9.0.0.M3\webapps\shop\index.html
when I'm trying to open http://localhost:8080/shop/
"The requested resource is not available"
occurs. I'm using spring mvc, so I'm getting the following message in terminal: No mapping for http request with URl shop/ in DispatcherServlet. Nevertheless it works fine if rename it to index.jsp
Currently, the default url for my sample application is:
http://127.0.0.1:8080/SpringMVC/
Is it possible for my to access it through below url ?
http://127.0.0.1:8080/
How can this be done ?
rename the war file to ROOT.war . Then delete (or rename) the default ROOT tomcat directory and start tomcat.