Commit 4d19cb7c authored by gmantele's avatar gmantele
Browse files

[TAP] Add the tap.TAP instance in attribute of the request for the Home Page when

forwarding toward a JSP file in the WebContent directory.

The name of the attribute is merely `tap`.
parent 0ea1f323
Loading
Loading
Loading
Loading
+13 −10
Original line number Original line Diff line number Diff line
@@ -16,7 +16,7 @@ package tap.resource;
 * You should have received a copy of the GNU Lesser General Public License
 * You should have received a copy of the GNU Lesser General Public License
 * along with TAPLibrary.  If not, see <http://www.gnu.org/licenses/>.
 * along with TAPLibrary.  If not, see <http://www.gnu.org/licenses/>.
 *
 *
 * Copyright 2015-2016 - Astronomisches Rechen Institut (ARI)
 * Copyright 2015-2018 - Astronomisches Rechen Institut (ARI)
 */
 */


import java.io.IOException;
import java.io.IOException;
@@ -52,7 +52,7 @@ import uws.UWSToolBox;
 * </p>
 * </p>
 *
 *
 * @author Gr&eacute;gory Mantelet (ARI)
 * @author Gr&eacute;gory Mantelet (ARI)
 * @version 2.1 (09/2016)
 * @version 2.3 (04/2018)
 * @since 2.0
 * @since 2.0
 */
 */
public class HomePage extends ForwardResource {
public class HomePage extends ForwardResource {
@@ -84,6 +84,9 @@ public class HomePage extends ForwardResource {


	@Override
	@Override
	public boolean executeResource(final HttpServletRequest request, final HttpServletResponse response) throws IOException, TAPException{
	public boolean executeResource(final HttpServletRequest request, final HttpServletResponse response) throws IOException, TAPException{
		// Share the TAP instance with JSPs:
		request.setAttribute("tap", tap);

		// Try by default a forward toward the specified file:
		// Try by default a forward toward the specified file:
		boolean written = forward(tap.homePageURI, tap.homePageMimeType, request, response);
		boolean written = forward(tap.homePageURI, tap.homePageMimeType, request, response);