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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:01:58+00:00 2026-06-01T17:01:58+00:00

My controllers are currently mapped to be something like http://example.com/fix.go and, of course, I

  • 0

My controllers are currently mapped to be something like http://example.com/fix.go and, of course, I think that’s idiotic and want something nicer like http://example.com/fix or http://example.com/mmm/fix with no extension. When I try to configure this, however, I can’t get it to work. I’m clearly missing a key part of understanding on the entire mapping. I’m using Spring 3.x, tomcat, and annotations for the controllers.

My web.xml is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<web-app
    version="2.4"
    xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

    <servlet>
        <servlet-name>BooBoo</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>BooBoo</servlet-name>
        <url-pattern>*.*</url-pattern>   <!-- was *.go when it worked -->
    </servlet-mapping>

    <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>

</web-app>

BooBoo-servlet.xml is:

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:p="http://www.springframework.org/schema/p" 
    xmlns:context="http://www.springframework.org/schema/context"
    xsi:schemaLocation="
        http://www.springframework.org/schema/mvc
            http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
        http://www.springframework.org/schema/beans 
            http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
        http://www.springframework.org/schema/context 
            http://www.springframework.org/schema/context/spring-context-3.0.xsd">

    <context:component-scan base-package="com.foofoo.booboo"/>

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

</beans>

And one of my controllers is configured as such:

@Controller
public class BangBangController extends BaseController {

            // Used to be fix.go when it worked
    @RequestMapping( value="fix", method=RequestMethod.GET )
    public ModelAndView choose(
            HttpSession session,
            @RequestParam( value="fixId", required=false, defaultValue="-1" ) Integer fixId,
            @RequestParam( value="forkId", required=false, defaultValue="-1" ) Integer forkId 
    )
    throws Exception { ... }
}

I’ve tried changing the mapping in web.xml to /mmm/* expecting URLs like http://example.com/mmm/fix to work, but that too has not worked. I get “missing resource” errors when I enter what I think are the correct URLs in the browser.

What am I goofing up here? What critical piece of understanding do I lack? I’ve tried making the no extension thing work on another project at work, and couldn’t get it to go there either. I’m obviously missing something.

  • 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-01T17:02:02+00:00Added an answer on June 1, 2026 at 5:02 pm

    The problem is your dispatcher servlet is matching anything with a “.” in it.

    Change it to

     <url-pattern>/*</url-pattern> 
    

    However, that’s also bad as you won’t be able to serve static content.

    What you really should do is this:

     <url-pattern>/webapp/*</url-pattern> 
    

    Where “webapp” is some prefix. All of your URLs will need to be prefixed with it, but that allows you to still serve static content.

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

Sidebar

Related Questions

I currently have a type that I inject into my controllers that's used for
I'm currently using StructureMap with MVC, but its complaining that my api controllers don't
I currently have a abstract controller class that I all my controllers inherit from.
In the iPhone app I'm currently working on, I'd like two view controllers (I'll
currently I have a medium sized MVC project with multiple controllers that support paging
I have numerous controllers in my application that extend a central controller class. Currently,
Currently using Xcode 4.2 and I have two view controllers (1 and 2). I
I'm currently trying to return multiple JSON objects in one of my controllers as
Here is the thing. I currently have a tabBar controller, with several navigation controllers
I am developing an application that currently has a View Controller (call it ViewControllerX).

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.