• 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

Linkking css & js to jsp in struts

 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am working on struts project. I want to keep my jsp pages and related css & javascript file inside WEB-INF.
But doing this I am unable to link & reference the css & js files in my jsp page. Here I am providing the code
to link & refer the extra files & the project structure tree.



It didn't work, then I tried,


again it also didn't work,

this is the folder tree
MyProject
----------WEB-INF
------------------pages
------------------------css
-----------------------------main.css
------------------------js
------------------------------common.js
------------------------register.jsp
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
WEB-INF is not publicly accessible so it is impossible to link to the external file with a link and script tag.

You have to move the files out of WEB-INF.

Eric
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic