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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T01:08:34+00:00 2026-05-17T01:08:34+00:00

I am using spring frameworking following is the mapping of url to controller <bean

  • 0

I am using spring frameworking following is the mapping of url to controller

<bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="mappings">
<props>
<prop key="/controller.web">webController</prop>
<prop key="/robots.txt">robotsController</prop>
</props>
</property>
</bean>

When i hit controller.web control gets to the web controller but when i hit robots.txt control do not transfer to the robotsController instead it tries to find out resource robots.txt if i remove robots.txt from context dir it says resource not found.

if i change robots.txt to robots.web it works fine it means there is some thing fishy with robots.txt’s name any idea ?

  • 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-17T01:08:34+00:00Added an answer on May 17, 2026 at 1:08 am

    I guess your DispatcherServlet is mapped as <url-pattern>*.web</url-pattern>, therefore it handles only requests to *.web.

    If you want DispatcherServlet to handle request with different extensions you have several options:

    • Add several url-patterns to <servlet-mapping>:

      <url-pattern>*.web</url-pattern>
      <url-pattern>*.txt</url-pattern>
      
    • Handle all requests with DispatcherServlet mapped as <url-pattern>/</url-pattern>. Note that this approach requires some effort to serve static content, see here.

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

Sidebar

Related Questions

I'm using Spring's ContextLoaderListener to initialise a web services client, but if the wsdl
I'm using Spring 3.0 along with Spring Security. I've always used the following configuration:
Using Spring 3 I have two forms: adding Item and invalidating Item I have
I am using Spring Roo. There is table:table and table:column tags. How to display
I am using Spring (with Jackson) and jQuery to pass a form as an
I am using Spring 3.0. Can i read a property file from a localdrive
I'm developing webapp using spring 3 mvc and using annotation-based controllers. I want to
Hi I am using Spring Roo to create a service to access the data
I am using Spring's declarative transactions (the @Transactional annotation) in aspectj mode. It works

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.