• 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

Path to JavaScript or CSS

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How should i mention the path in my jsp page so that i can include css or js?

My Struts Structure

-WebInf
--CSS
---style.css
-failure.jsp


failure.jsp


I used the above code but iam not getting the css applied in my jsp.

Thanks in advance
Capture.JPG
[Thumbnail for Capture.JPG]
structure
 
Sheriff
Posts: 9707
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The browser can't access files inside of WEB-INF directory directly. You'll have to move your CSS directory outside of the WEB-INF directory i.e. under the WebContent folder...
 
vinoth kumar v
Greenhorn
Posts: 6
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi I pasted the css in the web content and i changed my code as below



and



but still it doesnt work. It would be great if you provide me some example.

I like to have css and javascripts in seperate folder.

so please give an example assuming that it is in some folder
and also give me good programming practices of placing the css and js files in STRUTS appliction with example

thanks

 
vinoth kumar v
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Iam still facing the issue.
Can anyone help me on this.
reply
    Bookmark Topic Watch Topic
  • New Topic