• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Struts2 - s:include External File Dynamically

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a situation where I have an html help file that is located external to my application. The location and name of this file is held in a database. I want to use the s:include tag to include the html file in a jsp where the associated action reads the table, pulls the help file and location and assigns it to a property, then use the property in the s:include tag.



Works Correctly: The action sets helpFileLink = "c:/AIPP/ApplicationProperties/SccfOperationsHelp.html"
Works Correctly: The JSP sets linkValue = helpFileLink

When I run the code above it throws an exception because s:include adds a relative path to the link:
com.ibm.ws.webcontainer.exception.IncludeFileNotFoundException: SRVE0190E: File not found: /pages/c:/AIPP/ApplicationProperties/SccfOperationsHelp.html

How do I reference a file outside the application? Or, how do I remove the relative part of the path that is automatically added by the include tag?

Any help is greatly appreciated.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic