javascript - How to include .js file in google app engine project -


i have .jsp page frontend of app. need include seperate .js file in page.

my directories this

src |--->com.stuff      |--->servlet.java war |-->web-inf     |--->pages          |---->page.jsp                include.js 

from java servlet call

requestdispatcher jsp = req.getrequestdispatcher("/web-inf/pages/page.jsp"); 

which works fine in page.jsp have this

<!doctype html> <html>     <head>         <title>page</title>         <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"type="text/javascript" ></script>         <script src="./include.js" type="text/javascript" ></script>      </head>     <body>         <h1>page</h1>     </body> </html> 

i've tried few differnet things in place of "./include.js" , error firebug saying

"networkerror: 404 not found - http://localhost:8888/include.js" 

have read docs on "using static files" https://developers.google.com/appengine/docs/java/gettingstarted/staticfiles

you should!

it explicitly states "by default, app engine makes files in war available static files except jsps , files in web-inf/."

and include.js inside web-inf/


Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -