Reputation: 24092
I am working on displaying charts in my GWT project but somehow I cannot get highcharts to work. I have the following html file:
<!doctype html>
<html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script type="text/javascript" src="js/highcharts.js"></script>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="StockWeather.css">
<title>Web Application Starter Project</title>
<script type="text/javascript" language="javascript" src="stockweather/stockweather.nocache.js"></script>
</head>
<body>
<iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe>
<noscript>
<div style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif">
Your web browser must have JavaScript enabled
in order for this application to display correctly.
</div>
</noscript>
<h1>Web Application Starter Project</h1>
<table align="center">
<tr>
<td colspan="2" style="font-weight:bold;">Please enter your name:</td>
</tr>
<tr>
<td id="nameFieldContainer"></td>
<td id="sendButtonContainer"></td>
</tr>
<tr>
<td colspan="2" style="color:red;" id="errorLabelContainer"></td>
</tr>
</table>
</body>
</html>
with this directory structure :
├── gfx
│ └── vml-radial-gradient.png
├── graphics
│ ├── skies.jpg
│ ├── snow.png
│ └── sun.png
├── gwt-unitCache
│ ├── gwt-unitCache-000........
├── index.htm
├── js
│ ├── adapters
│ │ ├── mootools-adapter.js
│ │ ├── mootools-adapter.src.js
│ │ ├── prototype-adapter.js
│ │ └── prototype-adapter.src.js
│ ├── highcharts.js
│ ├── highcharts-more.js
│ ├── highcharts.src.js
│ ├── modules
│ │ ├── canvas-tools.js
│ │ ├── canvas-tools.src.js
│ │ ├── data.js
│ │ ├── data.src.js
│ │ ├── exporting.js
│ │ └── exporting.src.js
│ └── themes
│ ├── dark-blue.js
│ ├── dark-green.js
│ ├── gray.js
│ ├── grid.js
│ └── skies.js
├── src
│ ├── com
│ │ └── example
│ ├── gfx
│ │ └── vml-radial-gradient.png
│ ├── graphics
│ │ ├── skies.jpg
│ │ ├── snow.png
│ │ └── sun.png
│ ├── index.htm
│ ├── js
│ │ ├── adapters
│ │ ├── highcharts.js
│ │ ├── highcharts-more.js
│ │ ├── highcharts.src.js
│ │ ├── modules
│ │ └── themes
│ ├── log4j.properties
│ └── META-INF
│ ├── jdoconfig.xml
│ └── persistence.xml
├── test
│ └── com
│ └── example
├── test-classes
│ └── com
│ └── example
└── war
├── favicon.ico
├── stockweather
│ ├── ..........
├── StockWeather.css
├── StockWeather.html
└── WEB-INF
├── appengine-web.xml
├── classes
├── deploy
├── lib
├── logging.properties
└── web.xml
I am getting this error on running this application:
Jun 12, 2013 9:28:02 PM com.google.appengine.tools.development.LocalResourceFileServlet doGet WARNING: No file found for: /js/highcharts.js
I have org.moxieapps.gwt.highcharts-1.5.0.jar
added to project.
What should I do more ? Where should I place highcharts.js
?
Upvotes: 0
Views: 511
Reputation:
If the url to your application is,
http://your.domain/subpath/index.htm
I would check if
http://your.domain/subpath/js/highcharts.js
reach the highcharts.js file
Upvotes: 0
Reputation: 24885
You should put all your static content inside the war
root directory. In this case, in a js
directory.
UPDATE: In fact, all the content that you want available for the webapp. Just remember that configuration and libraries/classes goes into the WEB-INF
subdirectory and it is not directly reachable (do not put static content there).
Upvotes: 2