How I can access to my application after a war deployments in wildfly 8

泪湿孤枕 提交于 2019-12-13 16:00:13

问题


I used to work on tomcat I try to deploy my app on wildfly 8 ,there a message said that deployment succes but I dont know how I can access to my app I used to use my app using for example : http://localhost:8080/Gnrqst/Api/enqueteurs on tomcat but now it's not working I ask is there another port to use on wildfly ? Thank you


回答1:


Unless you're including a jboss-web.xml given the name of your deployment the context name would be Gnrqst-0.0.1-SNAPSHOT. If you'd like the 0.0.1-SNAPSHOT to be removed you need to either rename the file before you deploy it or use a jboss-web.xml to define the context name.

<?xml version="1.0" encoding="UTF-8"?>
<jboss-web version="10.0"
       xmlns="http://www.jboss.com/xml/ns/javaee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-web_10_0.xsd">
    <context-root>/Gnrqst</context-root>
</jboss-web>



回答2:


Wildfly has the same default port (8080) for http so it should work.

Look at the standalone.xml file to see the current configuration (it is usually the very last of that file).

 <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
    <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
    <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9993}"/>
    <socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>
    <socket-binding name="http" port="${jboss.http.port:8080}"/>

There are two relevant settings. The port-offset= that applies to all values and the binding for "http". Make sure it is same as the snippet.

If you didnt change the settings, most likely the port is used by another application(sure tomcat is not running anymore?) or was used while starting (restart should work)

If wildfly actually works and servs content under that port you might want to try another address http://localhost:8080/Gnrqst-0.0.1-SNAPSHOT/Api/enqueteurs



来源:https://stackoverflow.com/questions/41859083/how-i-can-access-to-my-application-after-a-war-deployments-in-wildfly-8

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!