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

  • Home
  • SEARCH
  • 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 9176551
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:07:56+00:00 2026-06-17T17:07:56+00:00

I all, i have a spring application working with role based security. Application is

  • 0

I all,

i have a spring application working with role based security. Application is working fine it’s just i need to introduce some static HTML pages which will also be hosted in the same war. So if http://www.myapp.com/abc/work.jsp is my secure page then http://www.myapp.com/home.htm should show static html page. I have incorporated HTML files but issue is i am getting 404 on http://www.myapp.com/home.htm and http://www.myapp.com/abc/work.jsp works fine.

web.xml –

<display-name>guru</display-name>
      <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/app-security-config.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>
    </filter-mapping>
    <servlet>
       <servlet-name>dispatcher</servlet-name>
       <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
       <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>dispatcher</servlet-name>
        <url-pattern>/</url-pattern>
    </servlet-mapping>

  <welcome-file-list>
    <welcome-file>/home.htm</welcome-file>
  </welcome-file-list>

My app-security-config.xml

<http auto-config="false" disable-url-rewriting="false" access-decision-manager-ref="accessDecisionManager" 
    entry-point-ref="authenticationProcessingFilterEntryPoint">
    <custom-filter position="FORM_LOGIN_FILTER" ref="authenticationProcessingFilter" />
    <custom-filter position="LOGOUT_FILTER" ref="customLogoutFilter"/>
    <access-denied-handler error-page="/login.jsp?login_error=true"/> 
     <intercept-url pattern="/login.htm" filters="none" />
    <intercept-url pattern="/abc/def/**" access="ROLE_USER"/>
    <intercept-url pattern="/**" access="ROLE_ANONYMOUS" />
    <anonymous enabled='true'/> 
    <session-management session-authentication-strategy-ref="sas"/>  
    <custom-filter position="CONCURRENT_SESSION_FILTER" ref="concurrencyFilter" />
    </http>
  • 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-06-17T17:07:57+00:00Added an answer on June 17, 2026 at 5:07 pm

    Hi you should provide a mapping for static contents inside your dispatcher servlet configuration, something like:

    <mvc:resources mapping="/resources/**" location="/WEB-INF/" />
    

    In this way, if your static home.htm content is located inside /WEB-INF/ folder you can reach it from the url /resources/home.htm.
    This will avoid that spring intercept and redirect to a controller all paths starting with /resources reserving that path to static resources like images, css files, scripts and html static pages

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Spring/Hibernate web application (currently working fine on Tomcat) that I am
I have a Spring Security (form based authentication) web app running CXF JAX-RS webservices
All, I am trying to add Spring Security(3.0.7) to my web application(Spring 3.0.6, Tiles
I have a spring mvc 3.1 application based on this tutorial . I've modified
I'm working on a REST application with Spring-data Hibernate etc.. I've setup all my
As of now I have a working Spring application with persistence. However now I
I'm working on an application using Spring security. The application is extensible and I
i'm working on a quite complex java web application based on Spring framework and
I have a rather large spring application, and all I'm trying to share is
I am working on a Spring application and in JSPX page I need to

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.