• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

"html:base" tag usage confusion

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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"/>';
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic