diff --git a/LECTurE-DesktopApp/src/main/java/it/cnr/istc/lecture/desktopapp/Context.java b/LECTurE-DesktopApp/src/main/java/it/cnr/istc/lecture/desktopapp/Context.java index 678b64e..a663378 100644 --- a/LECTurE-DesktopApp/src/main/java/it/cnr/istc/lecture/desktopapp/Context.java +++ b/LECTurE-DesktopApp/src/main/java/it/cnr/istc/lecture/desktopapp/Context.java @@ -158,7 +158,7 @@ private Context() { } catch (IOException ex) { LOG.log(Level.SEVERE, null, ex); } - this.target = client.target("http://" + properties.getProperty("lecture-host", "localhost") + ":" + properties.getProperty("service-port", "8080")).path("LECTurE-WebApp-1.0").path("LECTurE"); + this.target = client.target("http://" + properties.getProperty("lecture-host", "localhost") + ":" + properties.getProperty("service-port", "8080")).path("LECTurE").path("resources"); user.addListener((ObservableValue observable, User oldValue, User newValue) -> { if (oldValue != null) { // we clear the current data.. @@ -206,7 +206,7 @@ private Context() { if (newValue != null) { // we set up a new user.. try { - mqtt = new MqttClient("tcp://" + properties.getProperty("lecture-host", "localhost") + ":" + properties.getProperty("mqtt-port", "1883"), String.valueOf(newValue.id), new MemoryPersistence()); + mqtt = new MqttClient("tcp://" + properties.getProperty("lecture-host", "localhost") + ":" + properties.getProperty("mqtt-port", "1884"), String.valueOf(newValue.id), new MemoryPersistence()); mqtt.setCallback(new MqttCallback() { @Override public void connectionLost(Throwable cause) { diff --git a/LECTurE-DesktopApp/src/main/resources/config.properties b/LECTurE-DesktopApp/src/main/resources/config.properties index aa406a8..7371673 100644 --- a/LECTurE-DesktopApp/src/main/resources/config.properties +++ b/LECTurE-DesktopApp/src/main/resources/config.properties @@ -13,6 +13,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -lecture-host=localhost +lecture-host=150.146.65.22 service-port=8080 -mqtt-port=1883 \ No newline at end of file +mqtt-port=1884 \ No newline at end of file diff --git a/LECTurE-WebApp/src/main/java/it/cnr/istc/lecture/webapp/LECTurEApplication.java b/LECTurE-WebApp/src/main/java/it/cnr/istc/lecture/webapp/LECTurEApplication.java index 600d899..33d6bb4 100644 --- a/LECTurE-WebApp/src/main/java/it/cnr/istc/lecture/webapp/LECTurEApplication.java +++ b/LECTurE-WebApp/src/main/java/it/cnr/istc/lecture/webapp/LECTurEApplication.java @@ -26,7 +26,7 @@ * * @author Riccardo De Benedictis */ -@ApplicationPath("LECTurE") +@ApplicationPath("resources") public class LECTurEApplication extends Application { @Override diff --git a/LECTurE-WebApp/src/main/resources/META-INF/persistence.xml b/LECTurE-WebApp/src/main/resources/META-INF/persistence.xml index 03e06de..7567332 100644 --- a/LECTurE-WebApp/src/main/resources/META-INF/persistence.xml +++ b/LECTurE-WebApp/src/main/resources/META-INF/persistence.xml @@ -1,11 +1,10 @@ - org.eclipse.persistence.jpa.PersistenceProvider java:app/jdbc/LECTurE-DataSource false - + diff --git a/LECTurE-WebApp/src/main/webapp/WEB-INF/glassfish-resources.xml b/LECTurE-WebApp/src/main/webapp/WEB-INF/glassfish-resources.xml index f610828..cf07273 100644 --- a/LECTurE-WebApp/src/main/webapp/WEB-INF/glassfish-resources.xml +++ b/LECTurE-WebApp/src/main/webapp/WEB-INF/glassfish-resources.xml @@ -13,8 +13,8 @@ - - + + diff --git a/LECTurE-WebApp/src/main/webapp/WEB-INF/glassfish-web.xml b/LECTurE-WebApp/src/main/webapp/WEB-INF/glassfish-web.xml index 7794649..c55d954 100644 --- a/LECTurE-WebApp/src/main/webapp/WEB-INF/glassfish-web.xml +++ b/LECTurE-WebApp/src/main/webapp/WEB-INF/glassfish-web.xml @@ -1,7 +1,7 @@ - /LECTurE-WebApp-1.0 + LECTurE diff --git a/LECTurE-WebApp/src/main/webapp/lecture.js b/LECTurE-WebApp/src/main/webapp/lecture.js index de08809..0a1a593 100644 --- a/LECTurE-WebApp/src/main/webapp/lecture.js +++ b/LECTurE-WebApp/src/main/webapp/lecture.js @@ -18,7 +18,7 @@ $(document).ready(function () { console.log("retrieving users.."); $.ajax({ - url: "http://localhost:8080/LECTurE-WebApp-1.0/LECTurE/users" + url: "http://localhost:8080/LECTurE/resources/users" }).then(function (users) { console.log("found " + users.length + " users.."); document.getElementById("users_count").textContent = users.length; @@ -60,7 +60,7 @@ $(document).ready(function () { var user_id = users[i].id; btn_del.onclick = function () { $.ajax({ - url: "http://localhost:8080/LECTurE-WebApp-1.0/LECTurE/users/" + user_id, + url: "http://localhost:8080/LECTurE/resources/users/" + user_id, type: "DELETE" }).then(function () { tbdy.removeChild(tr);