Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Tomcat and the fly likes no-www to www question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "no-www to www question" Watch "no-www to www question" New topic

no-www to www question

Den Wightman

Joined: Mar 05, 2012
Posts: 2
If the server.xml in Tomcat 5.5 has:

<Host name="">



Will the user still see the address with no-www if they go to, or will it automatically change it to

If not, is the urlrewritefilter the best way to do that?
Koen Aerts
Ranch Hand

Joined: Feb 07, 2012
Posts: 344

Unless you specifically set up redirect rules (for instance in Apache HTTP server) or your web app doesn't somehow redirect to "www" pages, the URL will remain whatever was entered in the client's browser address bar.
Den Wightman

Joined: Mar 05, 2012
Posts: 2
OK that's pretty much what I thought. Thanks.
I agree. Here's the link:
subject: no-www to www question
It's not a secret anymore!