Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7090207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:01:05+00:00 2026-05-28T08:01:05+00:00

I have a problem applying css to the web pages, using spring security (3.0.7

  • 0

I have a problem applying css to the web pages, using spring security (3.0.7 version). I have the following config:

<http auto-config="true" use-expressions="true">
<intercept-url pattern="/faces/resources/**" filters="none"/>
<intercept-url pattern="/faces/inicio.xhtml" access="permitAll"/>
<intercept-url pattern="/faces/paginas/autenticacion/login.xhtml*" access="permitAll"/>
<intercept-url pattern="/faces/paginas/administracion/**" access="isAuthenticated()"/>
<intercept-url pattern="/faces/paginas/barco/**" access="isAuthenticated()"/>
<intercept-url pattern="/faces/paginas/catalogo/**" access="permitAll"/>
<intercept-url pattern="/faces/paginas/error/**" access="permitAll"/>
<intercept-url pattern="/faces/paginas/plantillas/**" access="permitAll"/>
<intercept-url pattern="/**" access="denyAll" />

By default, I deny access to the whole pages. Then, I apply authorization to the concrete pages specifying their URLs patterns, and they apply first in the given order, being the denyAll rule the last one.

  • “inicio.xhtml” is the homepage.
  • “login.xhtml” is the login form.
  • “administracion” and “barco” directories contain pages that should be accessed just by authenticated users.
  • “catalogo” directory contains pages that should be accessed by everyone.
  • “error” directory contains the error pages of the app.
  • “plantillas” directory contains the template facelets pages of the
    app (I use JSF2).

The “resources” directory contain images, css files, and javascript. So in the first line I tell spring security not to use the security filter for it.

However, with this configuration, when I run the app, css styles are not applied to pages!!

I’ve checked that if I turn the default authorization to “permitAll”, it works. But I don’t want to do that, beacuse it isn’t a good practice.

Any idea why not working? I think it should work.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T08:01:06+00:00Added an answer on May 28, 2026 at 8:01 am

    This works if you are adding stylesheets inline. For example:

    <link type="text/css" rel="stylesheet" href="/resources/style.css" />
    

    If you are using

    <h:outputStylesheet> 
    

    tag, the url pattern should be like this

    <intercept-url pattern="/faces/javax.faces.resource/**" filters="none"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem applying the DebuggerDisplay attribute on a generic class: [DebuggerDisplay(--foo--)] class
I have problem creating new instance of excel 2007 using VBA (from Access 2002).
I have a problem with an image that I am applying a custom jquery
I have a problem in applying a regex in my Java code. My text
Hi I am New to Window phone 7, I have a Problem for Applying
I have a problem dealing with encrypted URL parameters when applying HttpUtility.UrlEncode or UrlDecode
I have a problem in applying the styles for scroll bar skins through actionscript.
I have following problem: I have a very long string String str = abcdefghiart----
I have problem in some JavaScript that I am writing where the Switch statement
I have problem with return statment >.< I want to store all magazine names

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.