Oracle GlassFish Server Generates URL with Null Prefix for Default Web Application. (Doc ID 1333135.1)

Last updated on NOVEMBER 05, 2016

Applies to:

Oracle GlassFish Server - Version: 2.1 and later   [Release: 2.1 and later ]
Information in this document applies to any platform.

Symptoms

On GlassFish Enterprise Server 2.1.1 patch 4 and later (to patch 12), when attempting to access a HTML page that contains a URL generated using HttpServletRequest.getRequestURI() in a default web application,  the resulting URL may have "null" as the prefix of the URL, that is "null/<context-path>".

When these URLs with the format of "http://<host>:<port>/null/app" are accessed, the request will result in a HTTP status 404 response, File not found.

Changes

This behavior happens when GlassFish Server is upgraded from GlassFish Server (GF) 2.1.1 patch 3 or earlier to patch 4 or later versions. This problem is not seen with GF 2.1.1 p3 or earlier versions.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms