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
Post a Comment