Unregistered web context: '/learning-0.0.1-SNAPSHOT' from server 
'default-server'
jboss is telling you the webapp /learning-0.0.1-SNAPSHOT was never registered 
to JBoss wildlfly server default-server

if you're like me you would put all your web application declarations in 
WEB-INF/web.xml

if you're not like me you can just declare @WebServlet at the top of your 
servlet class

In all other scenarios such as deploying from eclipse or maven deploy please 
reference Jboss documentation at
http://docs.wildfly.org/14/Getting_Started_Developing_Applications_Guide.html
Getting Started Developing Applications 
Guide<http://docs.wildfly.org/14/Getting_Started_Developing_Applications_Guide.html>
The helloworld quickstart is comprised of a servlet and a CDI bean. We also 
include an empty beans.xml file, which tells JBoss WildFly to look for beans in 
this application and to activate the CDI.beans.xml is located in WEB-INF/, 
which can be found in the src/main/webapp directory. Also in this directory we 
include index.html which uses a simple meta refresh to send the users browser 
to the ...
docs.wildfly.org


hth
________________________________
From: John W. Himpel <j...@jlhimpel.net>
Sent: Saturday, February 23, 2019 2:52 PM
To: user@struts.apache.org
Subject: Jboss 7.2 gives 404 after deployment

Greetings,

I have a very small Struts web app that I developed under Red Hat
Developer Studio.

I am using Struts 2.5.20, Jboss 7.2.0.

Right-click in on the project name in Red Hat Developer Studio, select
properties->Web Project Settings and the Context root: shows a
"learning".

After deployment, in Firefox I enter the following url:  "
http://localhost:8080/learning/UserAction.action"; and I get a 404
response.  I have tried every variation of url strings that I can think
of and everything returns a 404 response.

JBoss 7.2.0 standalone server.log

2019-02-22 17:07:02,490 INFO  [org.jboss.as.repository]
(DeploymentScanner-threads - 1) WFLYDR0001: Content added at location
/home/jwhimpel/EAP-
7.2.0/standalone/data/content/b4/f3236590274c68445ad55b03656b282e0425f1
/content
2019-02-22 17:07:02,492 INFO  [org.wildfly.extension.undertow]
(ServerService Thread Pool -- 128) WFLYUT0022: Unregistered web
context: '/learning-0.0.1-SNAPSHOT' from server 'default-server'
2019-02-22 17:07:02,550 INFO  [org.jboss.as.server.deployment] (MSC
service thread 1-4) WFLYSRV0028: Stopped deployment learning-0.0.1-
SNAPSHOT.war (runtime-name: learning-0.0.1-SNAPSHOT.war) in 58ms
2019-02-22 17:07:02,551 INFO  [org.jboss.as.server.deployment] (MSC
service thread 1-6) WFLYSRV0027: Starting deployment of "learning-
0.0.1-SNAPSHOT.war" (runtime-name: "learning-0.0.1-SNAPSHOT.war")
2019-02-22 17:07:05,345 INFO  [org.jboss.as.connector.deployers.jdbc]
(MSC service thread 1-1) WFLYJCA0004: Deploying JDBC-compliant driver
class org.hsqldb.jdbc.JDBCDriver (version 2.4)
2019-02-22 17:07:05,345 WARN  [org.jboss.weld.deployer] (MSC service
thread 1-1) WFLYWELD0013: Deployment learning-0.0.1-SNAPSHOT.war
contains CDI annotations but no bean archive was found (no beans.xml or
class with bean defining annotations was present).
2019-02-22 17:07:05,365 INFO  [org.jboss.as.connector.deployers.jdbc]
(MSC service thread 1-1) WFLYJCA0018: Started Driver service with
driver-name = learning-0.0.1-
SNAPSHOT.war_org.hsqldb.jdbc.JDBCDriver_2_4
2019-02-22 17:07:05,389 INFO  [org.wildfly.extension.undertow]
(ServerService Thread Pool -- 156) WFLYUT0021: Registered web context:
'/learning-0.0.1-SNAPSHOT' for server 'default-server'
2019-02-22 17:07:05,410 INFO  [org.jboss.as.server] (DeploymentScanner-
threads - 1) WFLYSRV0016: Replaced deployment "learning-0.0.1-
SNAPSHOT.war" with deployment "learning-0.0.1-SNAPSHOT.war"
2019-02-22 17:07:05,419 INFO  [org.jboss.as.repository]
(DeploymentScanner-threads - 1) WFLYDR0002: Content removed from
location /home/jwhimpel/EAP-
7.2.0/standalone/data/content/8d/df8d999263bba04385d5ec7d9be0c010c651e9
/content

struts.xml
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd";>

<struts>
        <package name="default" extends="hibernate-default">
                <global-allowed-methods>regex:[a-zA-Z]*</global-
allowed-methods>
                <action name="saveOrUpdateUser" method="saveOrUpdate"
class="net.jlhimpel.learning.web.UserAction">
                        <result name="success"
type="redirect">listUser</result>
                </action>
                <action name="listUser" method="list"
class="net.jlhimpel.learning.web.UserAction">
                        <result name="success">/register.jsp</result>
                </action>
                <action name="editUser" method="edit"
class="net.jlhimpel.learning.web.UserAction">
                        <result name="success">/register.jsp</result>
                </action>
                <action name="deleteUser" method="delete"
class="net.jlhimpel.learning.web.UserAction">
                        <result name="success"
type="redirect">listUser</result>
                </action>
        </package>
</struts>


web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
         xmlns="http://xmnls.jcp.org/xml/ns/javaee";
         xmlns:web="http://xmnls.jcp.org/xml/ns/javaee/web-app_3_1.xsd";
         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmnls.jcp.org/xml/ns/javaee/web-app_3_1.xsd";
         id="WebApp_ID"
         version="3.1"
>
  <display-name>learning</display-name>

  <filter>
                <filter-name>struts2</filter-name>
                <filter-class>
                        org.apache.struts2.dispatcher.filter.StrutsPrep
areAndExecuteFilter</filter-class>
        </filter>
        <filter-mapping>
                <filter-name>struts2</filter-name>
                <url-pattern>/*</url-pattern>
        </filter-mapping>

        <welcome-file-list>
                <welcome-file>index.jsp</welcome-file>
        </welcome-file-list>
</web-app>

pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance";
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
    <modelVersion>4.0.0</modelVersion>
    <groupId>net.jlhimpel</groupId>
    <artifactId>learning</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>war</packaging>
    <name>learning</name>

    <properties>
        <project.build.sourceEncoding>UTF-
8</project.build.sourceEncoding>
    </properties>


    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.6.1</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>8.1.16.v20140903</version>
                <configuration>
                    <stopKey>CTRL+C</stopKey>
                    <stopPort>8999</stopPort>
                    <systemProperties>
                        <systemProperty>
                            <name>xwork.loggerFactory</name>
                            <value>com.opensymphony.xwork2.util.logging
.log4j2.Log4j2LoggerFactory</value>
                        </systemProperty>
                    </systemProperties>
                    <scanIntervalSeconds>10</scanIntervalSeconds>
                    <webAppSourceDirectory>${basedir}/src/main/webapp/<
/webAppSourceDirectory>
                    <webAppConfig>
                        <descriptor>${basedir}/src/main/webapp/WEB-
INF/web.xml</descriptor>
                    </webAppConfig>
                </configuration>
            </plugin>

        </plugins>

        <finalName>learning</finalName>

    </build>
    <dependencies>
        <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>javax.servlet-api</artifactId>
                <version>4.0.1</version>
                <scope>provided</scope>
        </dependency>
        <dependency>
                <groupId>org.apache.struts</groupId>
                <artifactId>struts2-core</artifactId>
                <version>2.5.20</version>
        </dependency>
        <dependency>
                <groupId>org.apache.struts</groupId>
                <artifactId>struts2-convention-plugin</artifactId>
                <version>2.5.20</version>
        </dependency>
        <dependency>
                <groupId>com.google.code</groupId>
                <artifactId>struts2-fullhibernatecore-
plugin</artifactId>
                <version>2.2</version>
        </dependency>
        <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-core</artifactId>
                <version>5.4.1.Final</version>
        </dependency>
        <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-annotations</artifactId>
                <version>3.5.6-Final</version>
        </dependency>
        <dependency>
                <groupId>org.hibernate.common</groupId>
                <artifactId>hibernate-commons-annotations</artifactId>
                <version>5.1.0.Final</version>
        </dependency>
        <dependency>
                <groupId>org.hibernate.validator</groupId>
                <artifactId>hibernate-validator</artifactId>
                <version>6.1.0.Alpha3</version>
        </dependency>
        <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-collections4</artifactId>
                <version>4.3</version>
        </dependency>
        <dependency>
                <groupId>commons-logging</groupId>
                <artifactId>commons-logging</artifactId>
                <version>1.2</version>
        </dependency>
        <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>ejb3-persistence</artifactId>
                <version>1.0.2.GA</version>
        </dependency>
        <dependency>
                <groupId>org.hsqldb</groupId>
                <artifactId>hsqldb</artifactId>
                <version>2.4.1</version>
        </dependency>
        <dependency>
                <groupId>org.javassist</groupId>
                <artifactId>javassist</artifactId>
                <version>3.24.1-GA</version>
        </dependency>
        <dependency>
                <groupId>javax.transaction</groupId>
                <artifactId>jta</artifactId>
                <version>1.1</version>
        </dependency>
        <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-api</artifactId>
                <version>5.4.0</version>
                <scope>test</scope>
        </dependency>
        <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-log4j12</artifactId>
                <version>1.8.0-beta4</version>
                <scope>provided</scope>
        </dependency>
    </dependencies>
</project>


war file structure
     0 Fri Feb 22 17:06:50 CST 2019 META-INF/
   134 Fri Feb 22 17:06:48 CST 2019 META-INF/MANIFEST.MF
     0 Fri Feb 22 15:55:28 CST 2019 WEB-INF/
     0 Fri Feb 22 17:06:48 CST 2019 WEB-INF/lib/
     0 Fri Feb 22 15:55:28 CST 2019 WEB-INF/classes/
     0 Fri Feb 22 15:55:28 CST 2019 WEB-INF/classes/net/
     0 Fri Feb 22 15:55:28 CST 2019 WEB-INF/classes/net/jlhimpel/
     0 Fri Feb 22 15:55:28 CST 2019 WEB-
INF/classes/net/jlhimpel/learning/
     0 Fri Feb 22 15:55:28 CST 2019 WEB-
INF/classes/net/jlhimpel/learning/dao/
     0 Fri Feb 22 15:55:28 CST 2019 WEB-
INF/classes/net/jlhimpel/learning/domain/
     0 Fri Feb 22 15:55:28 CST 2019 WEB-
INF/classes/net/jlhimpel/learning/web/
   819 Fri Feb 22 16:01:26 CST 2019 WEB-INF/web.xml
443432 Fri Feb 22 13:27:54 CST 2019 WEB-INF/lib/antlr-2.7.6.jar
559366 Fri Feb 22 13:27:54 CST 2019 WEB-INF/lib/commons-collections-
3.1.jar
 57779 Fri Feb 22 13:27:54 CST 2019 WEB-INF/lib/commons-fileupload-
1.2.1.jar
 87776 Fri Feb 22 13:27:54 CST 2019 WEB-INF/lib/commons-io-1.3.2.jar
245274 Fri Feb 22 13:27:54 CST 2019 WEB-INF/lib/commons-lang-2.3.jar
 52915 Fri Feb 22 13:27:54 CST 2019 WEB-INF/lib/commons-logging-1.1.jar
313898 Fri Feb 22 13:27:54 CST 2019 WEB-INF/lib/dom4j-1.6.1.jar
 50583 Fri Feb 22 13:27:54 CST 2019 WEB-INF/lib/ejb3-persistence.jar
870292 Fri Feb 22 13:27:54 CST 2019 WEB-INF/lib/freemarker-2.3.13.jar
706710 Fri Feb 22 13:27:54 CST 2019 WEB-INF/lib/hsqldb.jar
597476 Fri Feb 22 13:27:54 CST 2019 WEB-INF/lib/javassist-3.9.0.GA.jar
 15071 Sat Feb 16 13:40:32 CST 2019 WEB-INF/lib/jta-1.1.jar
121070 Fri Feb 22 13:27:54 CST 2019 WEB-INF/lib/junit-3.8.1.jar
391834 Fri Feb 22 13:27:54 CST 2019 WEB-INF/lib/log4j-1.2.15.jar
168081 Fri Feb 22 13:27:54 CST 2019 WEB-INF/lib/ognl-2.6.11.jar
 23445 Sat Feb 16 13:40:32 CST 2019 WEB-INF/lib/slf4j-api-1.5.8.jar
  9679 Fri Feb 22 13:27:54 CST 2019 WEB-INF/lib/slf4j-log4j12-1.5.8.jar
2287261 Fri Feb 22 13:27:54 CST 2019 WEB-INF/lib/xwork-2.1.2.jar
1638078 Thu Feb 07 15:48:30 CST 2019 WEB-INF/lib/struts2-core-
2.5.20.jar
1524587 Fri Jan 25 13:34:08 CST 2019 WEB-INF/lib/freemarker-2.3.28.jar
236399 Fri Jan 25 13:34:08 CST 2019 WEB-INF/lib/ognl-3.1.21.jar
264060 Fri Jan 25 13:34:10 CST 2019 WEB-INF/lib/log4j-api-2.11.1.jar
 72446 Fri Jan 25 13:34:10 CST 2019 WEB-INF/lib/commons-fileupload-
1.4.jar
214788 Fri Jan 25 13:34:10 CST 2019 WEB-INF/lib/commons-io-2.6.jar
501879 Fri Jan 25 13:34:10 CST 2019 WEB-INF/lib/commons-lang3-3.8.1.jar
 87094 Thu Feb 07 15:48:30 CST 2019 WEB-INF/lib/struts2-convention-
plugin-2.5.20.jar
 53259 Sat Feb 02 15:53:06 CST 2019 WEB-INF/lib/asm-5.2.jar
 47197 Sat Feb 02 15:53:06 CST 2019 WEB-INF/lib/asm-commons-5.2.jar
 29582 Sat Feb 02 15:53:06 CST 2019 WEB-INF/lib/asm-tree-5.2.jar
 56843 Fri Feb 22 14:06:06 CST 2019 WEB-INF/lib/struts2-
fullhibernatecore-plugin-2.2.jar
7091486 Fri Feb 22 10:01:04 CST 2019 WEB-INF/lib/hibernate-core-
5.4.1.Final.jar
 66469 Wed Jan 30 18:51:28 CST 2019 WEB-INF/lib/jboss-logging-
3.3.2.Final.jar
164556 Sat Feb 16 13:28:52 CST 2019 WEB-INF/lib/javax.persistence-api-
2.2.jar
777669 Fri Feb 22 10:01:04 CST 2019 WEB-INF/lib/javassist-3.24.0-GA.jar
3240307 Fri Feb 22 10:01:06 CST 2019 WEB-INF/lib/byte-buddy-1.9.5.jar
445288 Fri Feb 22 10:00:56 CST 2019 WEB-INF/lib/antlr-2.7.7.jar
 26290 Fri Feb 22 10:01:02 CST 2019 WEB-INF/lib/jboss-transaction-
api_1.2_spec-1.1.1.Final.jar
187548 Fri Feb 22 10:01:02 CST 2019 WEB-INF/lib/jandex-2.0.5.Final.jar
 65100 Fri Feb 22 10:01:06 CST 2019 WEB-INF/lib/classmate-1.3.4.jar
 56674 Fri Feb 22 10:01:06 CST 2019 WEB-INF/lib/javax.activation-api-
1.2.0.jar
323600 Fri Feb 22 10:01:06 CST 2019 WEB-INF/lib/dom4j-2.1.1.jar
128076 Fri Feb 22 10:01:06 CST 2019 WEB-INF/lib/jaxb-api-2.3.1.jar
1093432 Fri Feb 22 10:01:06 CST 2019 WEB-INF/lib/jaxb-runtime-2.3.1.jar
 70288 Fri Feb 22 10:01:06 CST 2019 WEB-INF/lib/txw2-2.3.1.jar
 25523 Fri Feb 22 10:01:06 CST 2019 WEB-INF/lib/istack-commons-runtime-
3.0.7.jar
 36073 Fri Feb 22 10:01:06 CST 2019 WEB-INF/lib/stax-ex-1.8.jar
311876 Fri Feb 22 10:01:06 CST 2019 WEB-INF/lib/FastInfoset-1.2.15.jar
365546 Sat Feb 16 13:40:28 CST 2019 WEB-INF/lib/hibernate-annotations-
3.5.6-Final.jar
 71283 Sat Feb 16 13:40:26 CST 2019 WEB-INF/lib/hibernate-commons-
annotations-3.2.0.Final.jar
100884 Sat Feb 16 13:40:32 CST 2019 WEB-INF/lib/hibernate-jpa-2.0-api-
1.0.0.Final.jar
 76204 Fri Feb 22 10:01:02 CST 2019 WEB-INF/lib/hibernate-commons-
annotations-5.1.0.Final.jar
1243828 Fri Feb 22 14:36:30 CST 2019 WEB-INF/lib/hibernate-validator-
6.1.0.Alpha3.jar
 93107 Fri Feb 22 14:36:30 CST 2019 WEB-INF/lib/validation-api-
2.0.1.Final.jar
753996 Fri Feb 22 16:59:46 CST 2019 WEB-INF/lib/commons-collections4-
4.3.jar
 61829 Thu Jan 24 17:50:38 CST 2019 WEB-INF/lib/commons-logging-1.2.jar
 50583 Fri Feb 22 16:59:48 CST 2019 WEB-INF/lib/ejb3-persistence-
1.0.2.GA.jar
1552127 Fri Feb 22 16:59:50 CST 2019 WEB-INF/lib/hsqldb-2.4.1.jar
777727 Sun Feb 03 15:13:08 CST 2019 WEB-INF/lib/javassist-3.24.1-GA.jar
 12440 Fri Feb 22 17:06:20 CST 2019 WEB-INF/lib/slf4j-log4j12-1.8.0-
beta4.jar
489884 Fri Feb 22 17:06:18 CST 2019 WEB-INF/lib/log4j-1.2.17.jar
   530 Fri Feb 22 17:06:34 CST 2019 WEB-INF/classes/log4j2.xml
   940 Fri Feb 22 17:06:34 CST 2019 WEB-INF/classes/struts.xml
   881 Fri Feb 22 17:06:34 CST 2019 WEB-INF/classes/hibernate.cfg.xml
  2314 Fri Feb 22 17:06:32 CST 2019 WEB-
INF/classes/net/jlhimpel/learning/dao/UserDAOImpl.class
   429 Fri Feb 22 17:06:32 CST 2019 WEB-
INF/classes/net/jlhimpel/learning/dao/UserDAO.class
  2032 Fri Feb 22 17:06:32 CST 2019 WEB-
INF/classes/net/jlhimpel/learning/domain/User.class
  2933 Fri Feb 22 17:06:32 CST 2019 WEB-
INF/classes/net/jlhimpel/learning/web/UserAction.class
   322 Fri Feb 22 13:38:38 CST 2019 index.jsp
  2003 Fri Feb 22 13:38:38 CST 2019 register.jsp
     0 Fri Feb 22 17:06:52 CST 2019 META-INF/maven/
     0 Fri Feb 22 17:06:52 CST 2019 META-INF/maven/net.jlhimpel/
     0 Fri Feb 22 17:06:52 CST 2019 META-
INF/maven/net.jlhimpel/learning/
  4723 Fri Feb 22 17:06:10 CST 2019 META-
INF/maven/net.jlhimpel/learning/pom.xml
   114 Fri Feb 22 17:06:48 CST 2019 META-
INF/maven/net.jlhimpel/learning/pom.properties


Any suggestions or debugging tips would be greatly appreciated.

Thanks.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to