i cant understand why for the project it return 404 or cant connect to the host, since the wildfly start page open perfectly
My web.xml
<?xml version="1.0"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<display-name>HelloWorld</display-name>
<!--
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
-->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
</web-app>
Deploy an application But if you are running a standalone WildFly service, a simple way to deploy your application is to copy your application archive ( war/ear/jar ) into the $JBOSS_HOME/standalone/deployments directory in the server installation. The deployment-scanner subsystem detects the archive and deploys it.
WildFly is a Java Enterprise Edition fully featured application server that provides all the necessary features to run a Java web application. WildFly is designed and maintained by Red Hat and was formally known as JBoss AS.
WildFly takes an aggressive approach to memory management and is based on pluggable subsystems that can be added or removed as needed. The quick boot of WildFly combined with the easy-to-use Arquillian framework allows for test driven development using the real environment your code will be running in.
If the answer of ctomc does not work, you need create a file jboss-web.xml in /webapp/WEB-INF directory, with the next content:
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web version="13.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/schema/jbossas/jboss-web_13_0.xsd">
<context-root>/ContextProject</context-root>
</jboss-web>
remember to change the version of wildfly that you use, and specify the context in which your application runs "ContextProject"
Your application is avalibale at
http://localhost:8080/HelloWorld
as you can see also in your log. entry "register web context: /HelloWorld"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With