diff --git a/modules/agent/src/main/java/cn/keepbx/jpom/common/commander/impl/LinuxTomcatCommander.java b/modules/agent/src/main/java/cn/keepbx/jpom/common/commander/impl/LinuxTomcatCommander.java index 8f59b567f..8429cd956 100644 --- a/modules/agent/src/main/java/cn/keepbx/jpom/common/commander/impl/LinuxTomcatCommander.java +++ b/modules/agent/src/main/java/cn/keepbx/jpom/common/commander/impl/LinuxTomcatCommander.java @@ -24,7 +24,7 @@ public class LinuxTomcatCommander extends AbstractTomcatCommander { "-Dcatalina.base=\"%s\" " + "-Dcatalina.home=\"%s\" " + "-Djava.io.tmpdir=\"%stemp/\" " + - "org.apache.catalina.startup.Bootstrap %s &", tomcatInfoModel.getPath(), tomcatInfoModel.getPath(), + "org.apache.catalina.startup.Bootstrap %s", tomcatInfoModel.getPath(), tomcatInfoModel.getPath(), tomcatInfoModel.getPath(), tomcatInfoModel.getPath(), tomcatInfoModel.getPath(), tomcatInfoModel.getPath(), tomcatInfoModel.getPath(), cmd); try { diff --git a/modules/agent/src/main/java/cn/keepbx/jpom/controller/manage/TomcatManageController.java b/modules/agent/src/main/java/cn/keepbx/jpom/controller/manage/TomcatManageController.java index 79a75ba35..4e4220703 100644 --- a/modules/agent/src/main/java/cn/keepbx/jpom/controller/manage/TomcatManageController.java +++ b/modules/agent/src/main/java/cn/keepbx/jpom/controller/manage/TomcatManageController.java @@ -103,7 +103,7 @@ public class TomcatManageController extends BaseAgentController { if (tomcatInfoModelTemp == null) { if (StrUtil.isEmpty(tomcatInfoModel.getAppBase())) { - tomcatInfoModel.setAppBase(FileUtil.normalize(tomcatInfoModel.getPath()).concat("webapps")); + tomcatInfoModel.setAppBase(FileUtil.normalize(tomcatInfoModel.getPath()).concat(File.separator).concat("webapps")); } else { String path = FileUtil.normalize(tomcatInfoModel.getAppBase()); if (FileUtil.isAbsolutePath(path)) { @@ -184,7 +184,7 @@ public class TomcatManageController extends BaseAgentController { if (tomcatInfoModelTemp == null || tomcatInfoModelTemp.getId().equals(tomcatInfoModel.getId())) { if (StrUtil.isEmpty(tomcatInfoModel.getAppBase())) { - tomcatInfoModel.setAppBase(FileUtil.normalize(tomcatInfoModel.getPath()).concat("webapps")); + tomcatInfoModel.setAppBase(FileUtil.normalize(tomcatInfoModel.getPath()).concat(File.separator).concat("webapps")); } else { String path = FileUtil.normalize(tomcatInfoModel.getAppBase()); if (FileUtil.isAbsolutePath(path)) { diff --git a/modules/agent/src/main/java/cn/keepbx/jpom/service/manage/TomcatManageService.java b/modules/agent/src/main/java/cn/keepbx/jpom/service/manage/TomcatManageService.java index 3fe368403..1d400d6da 100644 --- a/modules/agent/src/main/java/cn/keepbx/jpom/service/manage/TomcatManageService.java +++ b/modules/agent/src/main/java/cn/keepbx/jpom/service/manage/TomcatManageService.java @@ -44,6 +44,10 @@ public class TomcatManageService extends BaseOperService { public TomcatInfoModel getItemByName(String name) { JSONObject allTomcat = getJSONObject(AgentConfigBean.TOMCAT); + if (allTomcat == null) { + return null; + } + JSONObject tomcat = null; for (String key : allTomcat.keySet()) { JSONObject object = allTomcat.getJSONObject(key);