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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:35:52+00:00 2026-06-16T00:35:52+00:00

I wrote an application in Java with Spring framework. In web.xml I define servlet

  • 0

I wrote an application in Java with Spring framework. In web.xml I define servlet mapping and when I use “/” pattern I get nice url for example “/login”,”/register” it’s fine but access to static resource like .jpg or .css is blocked. If I use pattern like “*.html” resources works fine but I don’t want url like “/login.html”.

How to solve this?

  • 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-16T00:35:53+00:00Added an answer on June 16, 2026 at 12:35 am

    Setup a resource handler in your dispatcher servlet configuration. This will allow all requests that have /resources/ within the url pattern to avoid being routed by the dispatcher servlet. When using this configuration you will need to place all of your static resources within a directory named resources.

    <!-- Handles HTTP GET requests for /resources/** by efficiently serving 
        up static resources in the ${webappRoot}/resources directory -->
    <mvc:resources location="/resources/" mapping="/resources/**" />
    

    Documentation

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

Sidebar

Related Questions

Is there a way to use my SOAP web service(spring-ws, java) as a XML
I have a web application developped in Java 1.5 with Spring framework. Application contains
I've never done a Java Web start application before. I wrote my app's JNLP
I'm trying to choose an AJAX-friendly Java framework for my first web application and
I'm working on a web application written in Java using the Tapestry 5.1.0.5 framework.
I have developed Flex - Java - Spring Web Application that I have deployed
I wrote an application in JAVA that adds articles to a Joomla site. My
I wrote a complex Java application with eclipse that uses many .jar libraries included
If I write an application in java, does it use native widgets if run
I have a spring web application with jsp pages that calls different web services

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.