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


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark ""html:base" tag  usage confusion " Watch ""html:base" tag  usage confusion " New topic
Author

"html:base" tag usage confusion

suji pra
Greenhorn

Joined: Sep 27, 2002
Posts: 11
I am trying to get my redirections work. I am using both javascript as well as struts <forward> ways to manage navigation.But not able to make redirections work perfectly.If I make my navigations work with javascript window.location.href="/jsp/junk.jsp" it fails for window.location.href="DisplayJunk.do" . Or sometimes the navigations work fine till I use my first javascript navigation and then fails. I tried to use <html:base/> tag and thought I solved the problem .But it wasnt so. Does anyone have good suggestions in this regard ? Thanks in advance.


He is able who thinks he is able.
Jason Menard
Sheriff

Joined: Nov 09, 2000
Posts: 6450
Your javascript should also be calling actions, as opposed to JSP pages directly. You can render the url of an action by using <html:rewrite>.
In other words, your javascript could say something like:
window.location.href='<html:rewrite page="/displayJunk.do"/>';
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: "html:base" tag usage confusion