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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T12:29:01+00:00 2026-06-03T12:29:01+00:00

I am using Spring MVC within Tomcat and what I thought was a standard

  • 0

I am using Spring MVC within Tomcat and what I thought was a standard configuration. The web.xml looks like this:

<servlet>
<servlet-name>acme</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>
        /WEB-INF/spring/appServlet/acme-spring.xml
    </param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
    <servlet-name>acme</servlet-name>
    <url-pattern>/</url-pattern>
</servlet-mapping>

Withing the Spring acme-spring.xml, I have the view-controller tag set to the root path:

<mvc:view-controller path="/" view-name="login.jsp"/

and the site resolver tag:

<bean id="siteResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver" >
    <property name="prefix">
        <value>/WEB-INF/views/</value>
    </property>
    <property name="suffix">
        <value>.jsp</value>
    </property>
</bean>

However, when I hit localhost:8080/acme, I would have expected the login.jsp but instead, I receive an Invalid URL error. I took a look at both HTTP Status 404 on Spring 3.1 MVC app and HTTP Status 404 on Spring 3.1 MVC app but there was no joy.

Thoughts on what I have misconfigured?

  • 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-03T12:29:05+00:00Added an answer on June 3, 2026 at 12:29 pm

    your tag should be like this

    <mvc:view-controller  path="/" view-name="login"/>
    

    because veiwResolver will take care about the prefix and suffix.

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

Sidebar

Related Questions

I'm using Spring MVC and jquery autocomplete, my spring controller looks like this @RequestMapping(value
I am using spring web mvc for my app's UI part.. By using following
This is an example of using ThrowawayController in Spring MVC: public class DisplayCourseController implements
I am using Spring MVC, and in my Controller, I am setting a standard
I am using Web Flow 2.0.7 with Spring MVC and Hibernate. My problem is
I am using Spring mvc within url rewrite tucky to have extension less Urls.
I'm using Spring MVC 3.0 and Tomcat. I have a bean that has a
I'm building a MVC web application (using the Spring MVC framework), and I'm a
I've implemented a Web application using Spring MVC. The Web application is integrated in
I'm creating an MVC Spring webapp. Using: Jetty (servlet container), DataNucleus (dao platform), DB4O

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.