ボタンのクリックでダイアログ ボックスを表示する必要があります。この目的で jquery を選択しましたが、次のエラーに直面しています。
1. GET http://localhost:8080/ReportFetcher/WebContent/WEB-INF/lib/jquery-ui-themes-1.10.3/themes/smoothness/jquery-ui.css 404 (Not Found)
2. GET http://localhost:8080/ReportFetcher/WebContent/WEB-INF/lib/jquery-1.10.1.js 404 (Not Found)
3. GET http://localhost:8080/ReportFetcher/WebContent/WEB-INF/lib/jquery-ui.js 404 (Not Found)
4. GET http://localhost:8080/resources/demos/style.css 404 (Not Found)
プロジェクトでこれらのファイルを配置した場所は次のとおりです: /ReportFetcher ---> WebContent---> WEBINF-->lib---> (ここでは、上記のすべてのファイルとフォルダーを配置します (jquery-ui-themes-1.10 .3/テーマ)。
ブラウザが上記のリソースを取得できない理由がわかりませんでした。
<head>
<link rel="stylesheet"
href="/ReportFetcher/WebContent/WEB-INF/lib/jquery-ui-themes-1.10.3/themes/smoothness/jquery-ui.css" />
<script src="/ReportFetcher/WebContent/WEB-INF/lib/jquery-1.10.1.js"></script>
<script src="/ReportFetcher/WebContent/WEB-INF/lib/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css" />
<script language="javascript">
$(document).ready(function() {
$("#trail").click(function() {
$("#dialog").dialog();
});
});
....
some more code here
私が使うとき
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css" />
すべてがうまくいきます。しかし、私のアプリケーションはインターネットに接続していなくても動作するはずです。