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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:33:43+00:00 2026-05-26T12:33:43+00:00

We have a url-pattern of /* and requests get to our controller, but we

  • 0

We have a url-pattern of “/*” and requests get to our controller, but we always get a 404.
Here is our web.xml

<servlet>
    <servlet-name>bro</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <init-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath:mo/config/mo-spring.xml</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
    <servlet-name>bro</servlet-name>
    <url-pattern>/*</url-pattern>
</servlet-mapping>

mo-spring.xml:

<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
    <property name="suffix" value=".jsp"/>
</bean>

<mvc:resources mapping="/css/**" location="/css/" /> 
<mvc:resources mapping="/images/**" location="/images/" /> 
<mvc:resources mapping="/js/**" location="/js/" />
<mvc:resources mapping="/views/" location="/views/" />

A bit of the controller:

@RequestMapping(value="/signon", method=RequestMethod.GET)
public String signon(HttpServletRequest request) {
            ...
    return "/WEB-INF/index";
}

If i use /xxx/* as the url-pattern in my web.xml everything works as expected, but we have a dojo app that we really don’t want to modify that wants to talk to /* and not /xxx/*

  • 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-26T12:33:44+00:00Added an answer on May 26, 2026 at 12:33 pm

    You have bro as the servlet name, but reference brio as the servlet name for your url mapping in server.xml

    If that’s not the problem and you are talking about wanting your app to respond to http://yourserver/* instead of http://yourserver/yourcontext/* then you need to deploy your webapp as the root webapp for the server. Here’s a question relating to that kind of configuration in tomcat Tomcat 6: How to change the ROOT application

    edit: copied from my comment – If you are mapping DispatcherServlet to root in your webapp you will need the default-servlet configuration mentioned in http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/htmlsingle/spring-framework-reference.html#mvc-default-servlet-handler

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

Sidebar

Related Questions

I have these two lines in my web.xml <url-pattern>/</url-pattern> : Index Servlet and <url-pattern>/login</url-pattern>
I have a security constraint declared in web.xml: <security-constraint> <web-resource-collection> <web-resource-name>LoggedIn</web-resource-name> <url-pattern>/screens/*</url-pattern> </web-resource-collection> <auth-constraint/>
I have a servlet that handles requests that match a pattern (*.sth). Now I
I hit the maximum url-patterns that one can have in the web.xml and I
At work here, we have a box serving XML feeds to business partners. Requests
I'm trying to implement java like url pattern matching in php. Suppose i have
I have URL like this: http://localhost/PMApp/temp.htm?ProjectID=462 What I need to do is to get
I am having difficult matching the url pattern I have url(r'^(?P<title>)', 'pages.views.PageNameRequest') and def
I'm trying to create a url pattern that will behave like controller/action/id route in
I have a servlet Filter that acts as the basis of my web stack.

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.