Skip to main content

OC4J tip: changing the server information

· One min read

When you are running OC4J in stand alone mode you are using the HTTP server that is bundle with it. This HTTP server returns by default for the HTTP information the following information: Server: Oracle Containers for J2EE

If you want to change that you just need to set the http.server.header property. For example,

java -Dhttp.server.header="My blog on Oracle" -jar oc4j.jar

will now look like:

HTTP/1.1 200 OKDate: Mon, 26 Feb 2007 21:52:53 GMTServer: My blog on OracleLast-Modified: Mon, 09 Oct 2006 19:17:10 GMTAccept-Ranges: bytesContent-Length: 19882Connection: closeContent-Type: text/html

Thanks to James Kirsh for this very useful tip...