Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,7 @@ package tap.resource;
* You should have received a copy of the GNU Lesser General Public License
* 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;
......@@ -52,7 +52,7 @@ import uws.UWSToolBox;
* </p>
*
* @author Gr&eacute;gory Mantelet (ARI)
* @version 2.1 (09/2016)
* @version 2.3 (04/2018)
* @since 2.0
*/
public class HomePage extends ForwardResource {
......@@ -84,6 +84,9 @@ public class HomePage extends ForwardResource {
@Override
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:
boolean written = forward(tap.homePageURI, tap.homePageMimeType, request, response);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment