我很好奇IntelliJ調試器如何使用我的glassfish服務器的domain.xml,並在請求時報告網頁。有關Glassfish Server如何使用IntelliJ Debugger運行的細節?
具體來說,我有一個名爲blobGame一個項目的IntelliJ使用該打開一個名爲blobGame當文物的.war和的.ear部署網頁上的GlassFish服務器。
首先,如何這些文物部署?當我部署他們,我必須有本地主機的URL是http://localhost:60836/blobGame_war_exploded,並本地主機:60836/blobGame不工作,即使我改變它在調試配置 - here is my debugger info
這是爲什麼?爲什麼url必須是/blobGame_war_exploded?它甚至不能/blobGame_ear_exploded,因爲我看到,也domain.xml中。
這裏是domain.xml中爲我的域名被稱爲「域2」的片段:所有的
<applications>
<application object-type="user" name="blobGame_ear_exploded" directory-deployed="true" location="file:/C:/Users/Kevin/EECS/blobGame/out/artifacts/blobGame_ear_exploded/">
<property name="archiveType" value="ear"></property>
<property name="isComposite" value="true"></property>
<property name="appLocation" value="file:/C:/Users/Kevin/EECS/blobGame/out/artifacts/blobGame_ear_exploded/"></property>
<property name="org.glassfish.ejb.container.application_unique_id" value="98074431158681600"></property>
<property name="defaultAppName" value="blobGame_ear_exploded"></property>
<module name="web.war">
<engine sniffer="ejb"></engine>
<engine sniffer="security"></engine>
<engine sniffer="weld"></engine>
<engine sniffer="web"></engine>
</module>
<engine sniffer="ear"></engine>
</application>
<application context-root="/blobGame_war_exploded" object-type="user" name="blobGame_war_exploded" directory-deployed="true" location="file:/C:/Users/Kevin/EECS/blobGame/out/artifacts/blobGame_war_exploded/">
<property name="archiveType" value="war"></property>
<property name="appLocation" value="file:/C:/Users/Kevin/EECS/blobGame/out/artifacts/blobGame_war_exploded/"></property>
<property name="org.glassfish.ejb.container.application_unique_id" value="98074431158812672"></property>
<property name="defaultAppName" value="blobGame_war_exploded"></property>
<module name="blobGame_war_exploded">
<engine sniffer="ejb"></engine>
<engine sniffer="security"></engine>
<engine sniffer="weld"></engine>
<engine sniffer="web"></engine>
</module>
</application>
</applications>
二,爲什麼不部署仍然使用以前的器物(如我假設他們是)當我重新部署或重新啓動服務器?
具體而言,當我按下重新啓動,我得到完全相同的HTML和我留下了之前的JavaScript文件,即使我在我的第二調試前的時間編輯的HTML或JS文件。 (我在新的調試中添加了警報(「測試」),但它並未顯示在新的調試中)。當我單獨訪問index.html頁面時,警報顯示出來)。
這裏是index.html的
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>keyBoardDemo</title>
</head>
<body>
<canvas id="canvas" width="800" height="600" style="border:1px solid #000000;"></canvas>
<p id="main"></p>
<script type="text/javascript" src=resources.js></script>
<script type="text/javascript" src=canvas.js></script>
<script type="text/javascript" src=keyboard.js></script>
<script type="text/javascript" src=packethandler.js></script>
<script type="text/javascript" src=player.js></script>
<script type="text/javascript" src=websocket.js></script>
</body>
</html>
這裏是canvas.js它調用:
alert("test 123"); //this is not called on the second redeployment!
var canvas = document.getElementById("canvas");
var context = canvas.getContext("2d");
不,我總是這樣,每當我重新啓動服務器或重新部署或更新類等刷新我的Chrome瀏覽器(使用網頁).. .. 這是行不通的。就像我說的,即使在重新啓動IntelliJ之後,即使文件已被修改,仍然保留我未更改的部署。 –
請提交新的youtrack,並將(私下)附加到.idea文件夾中。如果您不熟悉YouTrack,請參閱https://intellij-support.jetbrains.com/hc/en-us/articles/207241135。 –