我有一个小程序,每天生成一些静态html页面。我想将这些文件发布到Web应用程序服务器
对于Jboss我将所有文件放在.war文件夹中,我只需要创建一个文件.dodeploy
每天都会生成html页面。我必须每天将新页面发送到战争中以完成它。
我需要通过脚本部署war而不是手动执行下一个命令应该完成这项工作吗?
我想对WebSphere Application Server 8.5.5做同样的事情。 什么是最佳做法?
编辑
因为websphere需要耳朵,所以我用这种架构创建了一个:
testApp.ear/
--META-INF/
-- application.properties
--testApp.war/
-- WEB-INF/
-- web.xml
index.html
日志的结果:
************* End Display Current Environment *************
[4/16/18 23:40:10:539 CST] 00000001 ManagerAdmin I TRAS0017I: The startup trace state is *=info.
[4/16/18 23:40:10:805 CST] 00000001 AbstractShell A WASX7326I: Loaded properties file "/opt/IBM/WebSphere/AppServer/profiles/Node-3091/properties/wsadmin.properties"
[4/16/18 23:40:11:251 CST] 00000001 ProviderTrack I com.ibm.ffdc.osgi.ProviderTracker AddingService FFDC1007I: FFDC Provider Installed: com.ibm.ffdc.util.provider.FfdcOnDirProvider@2d9ade48
[4/16/18 23:40:11:331 CST] 00000001 SSLConfig W CWPKI0041W: One or more key stores are using the default password.
[4/16/18 23:40:11:337 CST] 00000001 SSLConfigMana I CWPKI0027I: Disabling default hostname verification for HTTPS URL connections.
[4/16/18 23:40:11:547 CST] 00000001 AdminConfigCl A WASX7208I: Validation settings in effect now: Level=HIGHEST, Cross-validation=true, Output file=/opt/IBM/WebSphere/AppServer/profiles/Node-3091/logs/wsadmin.valout
[4/16/18 23:40:11:984 CST] 00000001 ModelMgr I WSVR0801I: Initializing all server configuration models
[4/16/18 23:40:13:107 CST] 00000001 WorkSpaceMana A WKSP0500I: Workspace configuration consistency check is disabled.
[4/16/18 23:40:18:453 CST] 00000001 AbstractShell A WASX7090I: Executing command: "AdminApp.invoke(AdminApp.installInteractive('testApp.ear'))"
[4/16/18 23:42:53:967 CST] 00000001 AbstractShell E WASX7120E: Diagnostic information from exception with text "com.ibm.ws.scripting.ScriptingException: WASX7132E: Application install for testApp.ear failed: see previous messages for details.
" follows:
com.ibm.ws.scripting.ScriptingException: WASX7132E: Application install for testApp.ear failed: see previous messages for details.
at com.ibm.ws.scripting.AbstractShell.setAndThrowScriptingException(AbstractShell.java:1878)
at com.ibm.ws.scripting.AdminAppClient.invokeMBeanInstall(AdminAppClient.java:5819)
at com.ibm.ws.scripting.AdminAppClient.commonInstall(AdminAppClient.java:2922)
...
答案 0 :(得分:0)
同样的WAR应该运行得很好,你只需要将它部署到WebSphere。这就像在管理控制台中单击next-next-next或运行简短的wsadmin脚本一样简单。
如果您是非常新的但无法访问基于Web的管理控制台,您甚至可以在命令行上以交互方式安装:
调用wsadmin,然后输入:
AdminApp.installInteractive('/tmp/myapp.war)