jQuery in Action
[Logo] JavaRanch » Big Moose Saloon
  Search | FAQ | Recent Topics | Hot Topics
Register / Login


Reply Bookmark it! Watch this topic JavaRanch » Forums » Engineering » HTML and JavaScript
 
RSS feed
 
New topic
Author

Linkking css & js to jsp in struts

kavin clain
Ranch Hand

Joined: Jan 19, 2010
Messages: 42

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

This message was edited 1 time. Last update was at by kavin clain

Eric Pascarello
author
Sheriff

Joined: Nov 08, 2001
Messages: 13583

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

Race Schedule for 2010 for this running geek:
* National Half Marathon - 03/20 [1:44:51] * Frederick Marathon - 05/02 * Baltimore Marathon - 10/16 *
 
 
 
Reply Bookmark it! Watch this topic JavaRanch » Forums » Engineering » HTML and JavaScript
 
RSS feed
 
New topic
JProfiler
Get rid of your performance problems and memory leaks!