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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:05:11+00:00 2026-05-26T18:05:11+00:00

My Spring app deployed to prod server (shared tomcat 5.5) would respond to all

  • 0

My Spring app deployed to prod server (shared tomcat 5.5) would respond to all URL calls with 404 error (except /). After 3 days of hard work, I found that:

The problem is that in the production environment tomcat is being
fronted by an apache httpd which does not forward requests to tomcat
for urls of the form /foobar (without an extension). Apache doesn’t
know how to deal with those URLs and tries to serve them as static
files from the disk.

So, I need to configure apache to send all requests to tomcat. I believe, that would require changes to .htaccess files. I have .htaccess files in the below locations:

/public_html/.htaccess
/public_html/WEB-INF/.htaccess

Please help me with .htaccess content to achieve desired objective.

  • 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-26T18:05:11+00:00Added an answer on May 26, 2026 at 6:05 pm

    You should configure your <Location> directive for the URLs that represent your Tomcat application directly in your httpd.conf configuration file — or a corresponding file that is included in a manner that fits in with your distribution (or local environment) configuration. (Look for the include lines in your main Apache configuration file if you’re not sure whether or not your distribution or local environment is using some mechanism to break apart a configuration file.)

    If you place the <Location> directive for your Tomcat install in an .htaccess file, that file will be re-loaded and re-parsed on every single request, which can have a performance impact. If you place it in the main configuration, it’ll be read and parsed once, at server startup (and each time you use the apachectl restart option to reload the configuration).

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

Sidebar

Related Questions

I am debugging a Spring MVC (3.0) app, deployed on tomcat. I want to
I've deployed, after some struggle, a web-app on a (remote) Tomcat 5.5 server (Turnkey
I am learning Spring and building a sample app. I am getting the error:
I'm using Spring/Roo for an app server, and need to be able to post
I have a very large problem. I've written a large app using Flex3/Tomcat/BlazeDS/Spring that
I'm trying to use Spring to configure a web app deployed in JBoss. I've
I'm developing an app which uses Spring quite heavily. Spring and the Tomcat Security
I'm using spring and acegi in a webapp that's deployed in tomcat 5.5.26. I
We're using Spring 2.5.4/Hibernate 3.2/Websphere Application Server 6.1.0.17. We've deployed the application on an
I just deployed a Spring web application onto Glassfish. This app contains an injected

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.