Access to the CSS link tag was denied due to a SAMLRequest 403 error

Having trouble with adding a link tag to my JSP page in a Spring MVC application.

The issue arises when trying to handle "Access Denied" after submitting a SAMLRequest, as the link tag is displaying SAMLRequest instead of CSS text. Can anyone offer assistance?

Here's my JSP:

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
    <link rel="stylesheet" href="css/temp.css" type="text/css">
</head>
<body>
    <div class="forbidden">
        <div class="repeat-image">
            <div class="main-image image403">
                <div class="text-block">
                    <p class="status">403</p>
                    <p class="title">Access Denied</p>
                    <p class="message">You currently do not have permission to access this page.  Want access?</p>

                    <div class="instructions">
                        Instructions to request via Self Service UAA<br />
                        <ul>
                            <li>In SSUAA --> Search for "Access"</li>
                            <li>Click "Next" to confirm requests</li>
                        </ul>
                        You will receive an email confirmation and status updates for your request
                    </div>
                    <div class="message">
                        Go ahead and request it <a href="url" target="_blank">here &raquo; </a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html>

Firebug HTML Tab:

<html>
<head>
<link type="text/css" href="css/temp.css" rel="stylesheet">
<HTML><HEAD><TITLE>HTTP Post Binding (Request)</TITLE></HEAD><BODY Onload="document.forms[0].submit()"><FORM METHOD="POST" ACTION="/idp/SSO.saml2"><INPUT TYPE="HIDDEN" NAME="SAMLRequest" VALUE="PHNhbWxwOkF1dGhuUmVxdWVzdCB4bWxuczpzYW1scD0idXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6Mi4wOnBm5hbWVpZC1mb3JtYXQ6dHJhbnNpZW50IiBBbGxvd0NyZWF0ZT0idHJ1ZSIvPjwvc2FtbHA6QXV0aG5...
 

Directory Structure:
https://i.sstatic.net/IEc1V.jpg

Security Portion:

<security:http pattern="/css/**" security="none" />
<security:http pattern="/images/**" security="none" />
<security:http pattern="/403" security="none" /> 

<security:http entry-point-ref="entryPoint"
    use-expressions="true">
    <security:intercept-url pattern="/**"
        access="isAuthenticated()" />
    <security:custom-filter position="CAS_FILTER"
        ref="authenticationFilter" />
    <security:logout logout-url="/signout"
        logout-success-url="/" />
    <security:csrf disabled="true"/>
</security:http>

<bean id="authenticationFilter"
    class="com.espn.ese.ais.vod.ams.security.picketlink.PicketLinkAuthenticationFilter"
    lazy-init="true">
    <constructor-arg value="${picketlink.filter.processes.url}" />
    <property name="authenticationManager" ref="authenticationManager" />
    <property name="serviceUrl" value="${picketlink.service.url}" />
    <property name="authenticationFailureHandler">
        <bean class="org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler">
            <constructor-arg value="/403" />
        </bean>
    </property>
</bean>
<security:authentication-manager alias="authenticationManager">
    <security:authentication-provider
        ref="authenticationProvider" />
</security:authentication-manager>

<bean id="authenticationProvider"
    class="com.espn.ese.ais.vod.ams.security.picketlink.PicketLinkAuthenticationProvider"
    lazy-init="true">
    <property name="authenticationUserDetailsService">
        <bean
            class="com.espn.ese.ais.vod.ams.security.picketlink.PicketLinkAuthenticationUserDetailsService">
            <constructor-arg ref="userDetailsService" />
        </bean>
    </property>
</bean>

<bean id="userDetailsService"
    class="com.espn.ese.ais.vod.ams.security.TestUserDetailsService"
    lazy-init="true" />

Page Not found:

2016-07-28 10:19:18,023 WARN  [org.springframework.web.servlet.PageNotFound] (http-/0.0.0.0:8080-1) No mapping found for HTTP request with URI [/{contextroot}/css/temp.css] in DispatcherServlet with name 'spring-web'

Answer №1

After much searching, I have come across the resolution to the problem at hand. It turns out that I had forgotten to include

<mvc:default-servlet-handler />
in my spring-web-servlet.xml file.

A special thank you goes out to @bluro224 for taking the time to help me with this issue.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What could be causing the ISAPI error to appear on a duplicated website?

Recently, I was given the task of duplicating a live website for testing purposes as part of a corporate project. The goal is to create an exact replica of the current site, which is already up and running. I am working on this project using IIS 8. To beg ...

Discover additional features in Angular 4 by reading further

I am struggling with incorporating a "read more" feature in my paragraph on my website. The challenge I'm facing is determining how to trigger the feature to display only when there are more than 5 lines of text. <p>Contrary to popular belief, ...

XSLT: Tips for preventing the use of self-closing tags within HTML attributes

I am new to XSLT and I'm currently troubleshooting an issue with some XSLT code (version 2.0) that was written a few years ago. Here is a snippet of the XSLT code: <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" ...

Trouble with z-index when attempting to stack forms on top of one another

Currently, I am working on creating a login page and signup page for my program. The goal is to stack them on top of each other with only one being displayed at a time. However, I am facing an issue where they are not stacking properly. I attempted using t ...

Incorporate a corner box feature to bring attention to the typed.js functionality

I have successfully integrated typed.js into my project and now I am looking to replicate the highlighted text with an excel-like box in one corner. I've managed to get the text typing out while also adding an SVG for the box in HTML, but I'm hav ...

The select box in CSS is optimized for Chrome but poorly displayed in Firefox

Struggling with styling the select box for both webkit and moz browsers. It looks great in Chrome, but terrible in Firefox - the default option is not vertically aligned with the select box. Can someone help me pinpoint the issue in this code? CSS: sele ...

Centered Bootstrap 4 modal with responsive width

Struggling to create a BootStrap 4 Modal that is centered in the screen and adjusts its width based on content? You're not alone. Despite trying different approaches like the container fluid and CSS methods, achieving a variable width modal is proving ...

What could be the reason for my table row not showing up after clicking the button?

Having trouble with a new drop-down row in a form. The drop-down is only showing in the first cell, even when using colspan=5. Is there a better way to achieve this? Thank you for any help. <table cellspacing=0 cellpadding=7 border=1> <tr bg ...

Incorporating a new text tag

Is there a way to add a text label for every circle that can be rotated and have its color changed? I'm looking for a solution that doesn't involve JSON data, but instead retrieves the necessary information from somewhere else. var w = 3 ...

Error: the function was not defined and has not been caught

In an effort to develop a quiz application, I am working on a feature that will increment a counter when the correct answer is selected. While I have identified the correct answer, I am struggling with implementing a method called correctTest to achieve th ...

I am trying to layer 3 x 3 images on top of a background image, but the images are overlapping

I am in the process of creating a website using bootstrap 4. I have a background image that needs to have nine smaller images overlaid on top. However, the images are currently overlapping each other and need to be arranged properly. This layout also needs ...

Aligning Text Vertically with an Image in ul/li List Items

Apologies if this question has already been asked, but I've checked several similar inquiries in an attempt to merge the solution without much luck. I currently have a bootstrap row with two col-md-6's. The first column contains an image, while t ...

Creating an image using tiles in HTML

I have divided an image into 48 tiles (8x6) using a method similar to "Cutting an Image into 9 pieces C#". Now, I want to reconstruct the original image in HTML. What is the most effective approach to achieve this? Initially, I attempted to use a table wi ...

Optimizing the display of multiple list items using Javascript for two separate UL elements on a single webpage

How can I display a maximum of 5 list items in two separate UL elements on the same page and hide the rest? Users should be able to see more items by clicking a dynamic "See more" element created by JavaScript. Below are the UL elements I want to work wit ...

Next.js is causing me some trouble by adding an unnecessary top margin in my index.js file

I started a new project using next.js by running the command: yarn create next-app However, I noticed that all heading and paragraph tags in my code have default top margins in next.js. index.js import React, { Component } from "react"; import ...

Drop and drag action is preventing the onchange event from being triggered in the form

I have set up a form where users can either 'drag and drop' a file or 'click to upload' it. I want an action to be triggered whenever either of these actions takes place. To achieve this, I am using the onchange event to trigger an act ...

Improving my 'Adaptive' layout

Check out my website at kylesethgray.com. I've created a 'somewhat responsive design', but there are two issues that need fixing: Whenever I have a list, whether it's an <ul> or <ol>, the bullets get cut off when the bro ...

Enhancing NearQuery in Spring Data MongoDB with an additional criterion

Can additional criteria be added to a NearQuery? This is what I am currently doing: public List<UserLocation> getUsersNearLocation(Point point, double minimumDistance, double maximumDistance){ NearQuery query = NearQuery.near(point).minDistance ...

Accessing the background page of a Chrome extension while it's in operation

I am in the process of developing my first chrome extension that allows youtube.com/tv to run in the background so it can be accessed easily on a phone or tablet. Everything is working fine, except for the fact that if I want to watch the video and not j ...

Slower CSS rendering as Javascript finishes its tasks

I am currently dealing with a jQuery plugin that is quite large and complex, but I will not be sharing it here to keep things simple. The issue I am facing is relatively straightforward, so I will focus on the essential code snippets: There is a click eve ...