File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Tomcat server name issues Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat server name issues" Watch "Tomcat server name issues" New topic

Tomcat server name issues

Kerry Wilson
Ranch Hand

Joined: Oct 29, 2003
Posts: 254
We use a cdn to deliver our site via a url (, when tomcat receives these requests and redirects them the CDN passes that along to the client, which then begins using that server name.

Anyone know of a good way to force tomcat to use a certain server name. I would write a custom Valve but the redirect that is giving me issues is the directory trailing slash one that happens way early in the lifecycle.

It is very likely the CDN can take care of this for us, just thought someone would else might have an idea.
SCJP 1.4
Arvind Subramanian
Ranch Hand

Joined: Jul 25, 2008
Posts: 84
I dont know the exact solution, but you can able to achieve this via server.xml. Since we can able to filter the request based on incoming url. I hope you can use this to achieve what you desired...

"Many of lifes failure are people who did not realize how close they were to success when they gave up."
-Thomas Edison
I agree. Here's the link:
subject: Tomcat server name issues
It's not a secret anymore!