Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Path to JavaScript or CSS

 
vinoth kumar v
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • 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
 
Ankit Garg
Sheriff
Posts: 9521
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • Quote
  • Report post to moderator
Iam still facing the issue.
Can anyone help me on this.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic