aspose file tools*
The moose likes Struts and the fly likes & char in forward url Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "& char in forward url" Watch "& char in forward url" New topic
Author

& char in forward url

Kinjal Sonpal
Ranch Hand

Joined: Jun 06, 2003
Posts: 96
Hi All,
I'm putting a redirect to an external URL. The URL also requires some query parameters. when I put this url in the path attribute of the <forward> tag, the '&' character in url creates problem.
Is there a way to avoid the problem? May be some sort of escape char would be required.
Thanks and regards,
Kinjal Sonpal
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

What problem is it creating?


A good workman is known by his tools.
Kinjal Sonpal
Ranch Hand

Joined: Jun 06, 2003
Posts: 96
The DTD fails to understand the url. We normally validate all the xml files before they are packed. In this case the parser does not validate the string. Since right now I'm not in front of my office machine, I'll try to also post the error message.
Thanks and regards,
Kinjal Sonpal
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

Have you tried using
& amp ; (omit spaces)
as an Entity Reference?
[ May 03, 2004: Message edited by: Marc Peabody ]
[ May 03, 2004: Message edited by: Marc Peabody ]
Kinjal Sonpal
Ranch Hand

Joined: Jun 06, 2003
Posts: 96
Oh, silly me. It never struck me. Thanks a lot for reminding this. Yes, it solved the problem.
Thanks and regards,
Kinjal Sonpal
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: & char in forward url