Refrer javascript inside html file? -


i have below folder structure.

inside: webapp/web-inf/some.jsp have

i have javascript file in same webapp/web-inf/js/myform.js location

i referred in some.jsp below:

<script type="text/javascript" src="js/myform.js"></script> 

but not finding javascript file. in viewsource getting below lines:

<title>error 404 not_found</title> </head> <body><h2>http error: 404</h2><pre>not_found</pre> <p>requesturi=/js/myform.js</p><p><i><small><a href="http://jetty.mortbay.org/">powered jetty://</a></small></i></p><br/>    

is javascript link correct in jsp file?

please correct me.

thanks!

the web-inf folder secure, meaning can't access resources placed in directly using url browser.

to work around it, place js under webapp/js directory.


Comments