商城网站建设分为几块网页微信版看聊天记录有记录吗
商城网站建设分为几块,网页微信版看聊天记录有记录吗,竞价推广托管多少钱,网址创建聊天是解释WebSocket的最典型示例之一。 它是一个相当常用的界面#xff0c;可以很容易地解释WebSocket的基本概念。 当然#xff0c;Java EE 7 WebSocket也有一个#xff0c; 在这里可用 #xff01; 您可以使用以下步骤在WildFly上轻松运行它#xff1a; curl -O http:… 聊天是解释WebSocket的最典型示例之一。 它是一个相当常用的界面可以很容易地解释WebSocket的基本概念。 当然Java EE 7 WebSocket也有一个 在这里可用 您可以使用以下步骤在WildFly上轻松运行它 curl -O http://download.jboss.org/wildfly/8.1.0.Final/wildfly-8.1.0.Final.zip
unzip wildfly-8.1.0.Final.zip
./wildfly-8.1.0.Final/bin/standalone.sh
git clone https://github.com/javaee-samples/javaee7-samples.git
cd javaee7-samples
mvn -f websocket/chat/pom.xml wildfly:deploy 然后访问http// localhost8080 / chat / 。 WebSocket的最大优点之一是如何在与HTTP在本例中为8080相同的端口上打开套接字。 如果要将此应用程序部署到OpenShift则可以在端口8000上使用WebSocket进行常规访问而在端口8443上进行安全访问。 下图对此进行了解释 如果要在OpenShift上运行此聊天应用程序请使用以下步骤 单击此处在OpenShift中配置WildFly实例。 将名称更改为“ chatserver”并将其他所有名称更改为默认值。 单击“创建应用程序”以创建应用程序。 克隆工作空间 git clone ssh://544f08a850044670df00009echatserver-milestogo.rhcloud.com/~/git/chatserver.git/ 从以下位置编辑“ javaee7-samples / websocket / chat / src / main / webapp / websocket.js”的第一行 var wsUri ws:// document.location.hostname : document.location.port document.location.pathname chat; 至 var wsUri ws:// document.location.hostname :8000 document.location.pathname chat; 创建WAR文件 cd javaee7-samples
mvn -f websocket/chat/pom.xml 将生成的WAR文件复制到先前克隆的工作空间中 cd ..
cp javaee7-samples/websocket/chat/target/chat.war chatserver/deployments/ROOT.war 删除现有文件并将WAR文件添加到git存储库中 cd chatserver
git rm -rf src pom.xml
git add deployments/ROOT.war
git commit . -mupdating files
git push 这将输出显示为 Counting objects: 6, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 6.88 KiB | 0 bytes/s, done.
Total 4 (delta 1), reused 0 (delta 0)
remote: Stopping wildfly cart
remote: Sending SIGTERM to wildfly:285130 ...
remote: Building git ref master, commit 05a7978
remote: Preparing build for deployment
remote: Deployment id is 14bcec20
remote: Activating deployment
remote: Deploying WildFly
remote: Starting wildfly cart
remote: Found 127.2.87.1:8080 listening port
remote: Found 127.2.87.1:9990 listening port
remote: /var/lib/openshift/544f08a850044670df00009e/wildfly/standalone/deployments /var/lib/openshift/544f08a850044670df00009e/wildfly
remote: /var/lib/openshift/544f08a850044670df00009e/wildfly
remote: CLIENT_MESSAGE: Artifacts deployed: ./ROOT.war
remote: -------------------------
remote: Git Post-Receive Result: success
remote: Activation status: success
remote: Deployment completed with status: success
To ssh://544f08a850044670df00009echatserver-milestogo.rhcloud.com/~/git/chatserver.git/
454bba9..05a7978 master - master 现在您的聊天服务器位于 http : //chatserver-milestogo.rhcloud.com 看起来像 请享用 翻译自: https://www.javacodegeeks.com/2014/10/websocket-chat-on-wildfly-and-openshift.html
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/pingmian/90486.shtml
如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!