<\/a><\/p>\nSo I install my tomcat server, start it up, and when I curl I get 302 Moved Temporary, i move around the internet looking for a solution but I found a lot of technical solutions and install modules that i tried to no success, later I found the solution wasn’t missing modules but a missing “\/”, it seems when you enter your url with curl and don’t end it with a “\/” it goes to the webapps directory and looks at both the war file and the directory and returns this error. While writing this i also realized that the writing was on the wall, the location in the response is the new “moved to” location<\/p>\n
e.g curl -v http:\/\/localhost\/knock where knock is the URI will fail with 302 temporarily moved but curl -v http:\/\/localhost\/knock\/ will pass, give it a try.<\/p>\n
root@testserver lib]# curl -k -v http:\/\/localhost:8443\/knock
\n* About to connect() to localhost port 8443 (#0)
\n* Trying ::1… connected
\n* Connected to localhost (::1) port 8443 (#0)
\n> GET \/knockHTTP\/1.1
\n> User-Agent: curl\/7.19.7 (x86_64-redhat-linux-gnu) libcurl\/7.19.7 NSS\/3.14.3.0 zlib\/1.2.3 libidn\/1.18 libssh2\/1.4.2
\n> Host: localhost:8443
\n> Accept: *\/*
\n>
\n< HTTP\/1.1 302 Moved Temporarily
\n< Server: Apache-Coyote\/1.1
\n< Location: https:\/\/localhost:8443\/knock\/<\/span>
\n< Transfer-Encoding: chunked
\n< Date: Fri, 21 Nov 2014 19:01:35 GMT
\n<
\n* Connection #0 to host localhost left intact<\/p>\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<\/p>\n
[root@ghasbws00 conf]# curl -k -v https:\/\/knock:8443\/knock\/
\n* About to connect() to localhost\u00a0port 8443 (#0)
\n* Trying 10.135.144.51… connected
\n* Connected to localhost\u00a0(127.0.0.1) port 8443 (#0)
\n* Initializing NSS with certpath: sql:\/etc\/pki\/nssdb
\n* warning: ignoring value of ssl.verifyhost
\n* skipping SSL peer certificate verification
\n* SSL connection using TLS_DHE_RSA_WITH_AES_256_CBC_SHA
\n* Server certificate:
\n* subject: CN=localhost
\n* start date: Nov 24 21:32:36 2014 GMT
\n* expire date: Nov 23 21:32:36 2016 GMT
\n* common name:\u00a0localhost
\n* issuer: CN=cert-trial
\n> GET \/monitor\/ HTTP\/1.1
\n> User-Agent: curl\/7.19.7 (x86_64-redhat-linux-gnu) libcurl\/7.19.7 NSS\/3.14.3.0 zlib\/1.2.3 libidn\/1.18 libssh2\/1.4.2
\n> Host: localhost:8443
\n> Accept: *\/*
\n>
\n< HTTP\/1.1 200 OK
\n< Server: Apache-Coyote\/1.1
\n< Accept-Ranges: bytes
\n< ETag: W\/”258-1367575008000″
\n< Last-Modified: Fri, 03 May 2013 09:56:48 GMT
\n< Content-Type: text\/html
\n< Content-Length: 258<\/p>\n
The difference between success and failure is a simple “\/” away, hope this helps. This was on RHEL 6.4 running\u00a0javax.faces.webapp.FacesServlet.service<\/p>\n","protected":false},"excerpt":{"rendered":"
So I install my tomcat server, start it up, and when I curl I get 302 Moved Temporary, i move around the internet looking for a solution but I found a lot of technical solutions and install modules that i tried to no success, later I found the solution wasn’t missing modules but a missing … <\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-37","post","type-post","status-publish","format-standard","hentry","category-linux-os"],"_links":{"self":[{"href":"https:\/\/kujahapa.com\/wp-json\/wp\/v2\/posts\/37","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kujahapa.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kujahapa.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kujahapa.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/kujahapa.com\/wp-json\/wp\/v2\/comments?post=37"}],"version-history":[{"count":4,"href":"https:\/\/kujahapa.com\/wp-json\/wp\/v2\/posts\/37\/revisions"}],"predecessor-version":[{"id":57,"href":"https:\/\/kujahapa.com\/wp-json\/wp\/v2\/posts\/37\/revisions\/57"}],"wp:attachment":[{"href":"https:\/\/kujahapa.com\/wp-json\/wp\/v2\/media?parent=37"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kujahapa.com\/wp-json\/wp\/v2\/categories?post=37"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kujahapa.com\/wp-json\/wp\/v2\/tags?post=37"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}