• 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

detect current URL, referer in XSL???

 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
is it possible to detect current URL or referer in XSL?

(for conditionals.. for ex. if this stylesheet is in such-and-such a URL, etc..

where I work we do JSP/custom tags with code like, <framework:style uri="/xsl/dc_search.xsl....> so same XSL stylesheet might be used in more than one JSP..)

thank you..

-v
 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Veronica,
I can give you a small suggestion...you can get the user request URL, from HttpRequest instance itself. So, in your custom tag, create a HttpServletRequest instance (pageContext.getRequest()) and get the request URI using <instance>.getRequestURI()/<instance>.getRequestURL().
Store that into a Hashmap & pass it to the XSL trnasformer as a transform param. use the Hashmap key, as <xsl:param> in your XSL file. and use the param anywhere accross the XSL.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic