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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T17:44:17+00:00 2026-06-05T17:44:17+00:00

I have a Tomcat instance running within our corp network. Currently users can access

  • 0

I have a Tomcat instance running within our corp network.

Currently users can access it either by typing the machine name:
http://machine:8080
or by using the fully qualified name:
http://machine.company.com:8080
(This is only accessible internally)

However, I would like them to only use the full name. Is there a way to force a 301 redirect globally in tomcat (perhaps somewhere in server.xml, or conf.xml), where any resource accessed over the short name will forward (301) to the long name?

  • 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-05T17:44:20+00:00Added an answer on June 5, 2026 at 5:44 pm

    I’m not a fan of globally-configured things such as this, but you can globally-configure filters in Tomcat in conf/web.xml. You can either write your own filter for this specific case, or use url-rewrite (http://www.tuckey.org/urlrewrite/) to do it for you. In either case, you will have to put your code (lr url-rewrite library) either in Tomcat’s lib directory (yuck) or modify catalina.properties to re-introduce the “common” ClassLoader and place your code (or library) in there (also yuck).

    If you only have a single webapp deployed, then you can configure all of this in the one webapp and not bother with all the aforementioned “yucks”.

    Also, if you have a web server out in front of Tomcat (say, Apache httpd), then of course you can do this kind of thing out at that level.

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

Sidebar

Related Questions

I have a multiple contexts running in one tomcat instance each context need access
I have an instance of Apache Tomcat 6.x running, and I want it to
I currently have a tomcat servlet 1 running under the ROOT: api1.myhost.com:8080/ I'm using
I have a tomcat 6.20 instance running, and would like to send an email
I have two web applications running in the same Tomcat Instance. In one of
I have a Tomcat 6.0.24 server running. I'm using to run some JSP pages.
I have Apache Tomcat Version 7.0.26 running. A have a JAX-RS servlet under /test,
I have installed apache-tomcat-6.0.35-windows-x86 in my system. How can I configure it and set
I have a Java application hosted on a remote tomcat instance that executes a
Background: We have a Webservice that is running under axis2 on a Tomcat. We

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.