This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Struts and the fly likes html:rewrite Giving the Wrong Domain Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "html:rewrite Giving the Wrong Domain" Watch "html:rewrite Giving the Wrong Domain" New topic
Author

html:rewrite Giving the Wrong Domain

Jamie Jackson
Ranch Hand

Joined: Jan 11, 2005
Posts: 58
Using <html:rewrite/> in a Struts app.

When I hit the site's primary domain (www.myDomain.com), <html:rewrite/> returns the correct domain (www.myDomain.com); however, if I hit an alternate domain (e.g., myAlternateDomain.com), it still returns the primary domain. I realize this has something to do with my Apache Virtual Hosts (see snippet below), but I don't know how to fix it.

<VirtualHost *>
ServerName www.myDomain.com
ServerAlias myDomain.com
ServerAlias myAlternateDomain.com
ServerAlias myAlternateDomain2.com
...
</VirtualHost>

Suggestions?

Thanks,
Jamie
Jamie Jackson
Ranch Hand

Joined: Jan 11, 2005
Posts: 58
I see that nobody likes my sad, lonely post. Can anyone suggest a better place to ask it? I don't know if it's more of a Struts question or an Apache question.

Thanks,
Jamie
Jamie Jackson
Ranch Hand

Joined: Jan 11, 2005
Posts: 58
Nevermind. Some mean person had put a base href tag in the header.

I deleted it violently. It works now, of course.

Thanks,
Jamie
Kerry Wilson
Ranch Hand

Joined: Oct 29, 2003
Posts: 254
Maybe, there is a base tag in your page that is throwing everything out of whack.....

Oh, nevermind....


http://www.goodercode.com
SCJP 1.4
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: html:rewrite Giving the Wrong Domain
 
It's not a secret anymore!