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 7458411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T13:26:38+00:00 2026-05-29T13:26:38+00:00

I have an application with JSF+Spring. I am using spring security and i works

  • 0

I have an application with JSF+Spring.
I am using spring security and i works properly.However when i try to reach a secured page without authentication,instead of redirecting me to the denied page i just shows 403 Forbidden page.
I don’t know if there is anyting missing on applicationContext or web.xml,here is my code:

part of applicationContext:

<sec:http access-denied-page="/denied.xhtml"  auto-config="true" use-expressions="false" >
    <sec:form-login login-page="/login.xhtml" default-target-url="/"   authentication-failure-url="/denied.xhtml"
    login-processing-url="/static/j_spring_security_check"
    />
    <sec:intercept-url pattern="/PANEL/**"  access="ROLE_GENERALT"></sec:intercept-url>
    <sec:logout invalidate-session="true" logout-url="/index.xhtml"/>
    </sec:http>

<sec:global-method-security secured-annotations="enabled" jsr250-annotations="enabled"></sec:global-method-security>

and web.xml:

    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath:/appContext.xml
        </param-value>
    </context-param>
    <filter>
    <filter-name>springSecurityFilterChain</filter-name>
    <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>

</filter>

<filter-mapping>
  <filter-name>springSecurityFilterChain</filter-name>
  <url-pattern>/*</url-pattern>
  <dispatcher>FORWARD</dispatcher>
  <dispatcher>REQUEST</dispatcher>
</filter-mapping>
  • 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-29T13:26:39+00:00Added an answer on May 29, 2026 at 1:26 pm

    You need to set errorpage property for the accessDeniedHandler which is used by ExceptionTranslationFilter when an AccessDeniedException occurs

    see this for info link

    <bean id="exceptionTranslationFilter" class="org.springframework.security.web.access.ExceptionTranslationFilter">
      <property name="authenticationEntryPoint" ref="authenticationEntryPoint"/>
      <property name="accessDeniedHandler" ref="accessDeniedHandler"/>
    </bean>
    
    <bean id="accessDeniedHandler" class="org.springframework.security.web.access.AccessDeniedHandlerImpl">
      <property name="errorPage" value="/denied.xhtml"/>
    </bean>
    

    alternatively, you can just add this to your web.xml

    <error-page>
      <error-code>403</error-code>
      <location>/pages/denied.xhtml</location>
    </error-page>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am preparing a registration page using JSF/Spring webflow&mvc application. I have added two
I am using jsf and spring together in web application. I have configured datasource
I have small application using JSF 1.1. It is using NTLM for authentication. What
i have a JSF web application. I use Beans as Spring Beans (not JSF
Ok simple question. I have a JSF application, containing a login page. The problem
I have some problem's with a simple application in JSF 2.0. I try to
I'm using JSF 1.2 with Richfaces and Facelets. I have an application with many
I am developing a web application using JSF on Netbeans 7.0. I have created
I`m developing an application using Spring WebFlow 2, Facelets and JSF. One of my
I have simple JSF application. Everything works fine, but not navigation. It behaves like

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.