5 Replies Latest reply on May 30, 2016 4:48 AM by asim dogar

    Undertow context path problem deploying application

    Georges Guyen Newbie

      Hello !

       

       

      Recently I upgraded my jboss as 7 installation to wildfly 8 and I got a problem regarding the context path, here are the details:

       

      Wildfly 8 is deployed to a specific IP on the network : lets say 192.168.1.12.

      I changed the standalone.xml and changing all the localhost entries for the 192.168.1.12 then I restarted the application.

      On the server.log file, I can see :

      2014-04-07 21:41:48,300 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-5) JBAS017534: Registered web context: /app

       

      However, when I go to this url : http;//192.168.1.12:8080/app, I have a 404 not found page ! ( and the Widlfy 8 welcome page works ! http://192.168.1.12:8080 )

      BUT when I did a test on my local machine ( aka localhost ) then it works !!! ( http://localhost:8080/app )

       

      Can I have some explanations ?

      I'm deploying the EAR file like this :

       

      <plugin>

                      <groupId>org.apache.maven.plugins</groupId>

                      <artifactId>maven-ear-plugin</artifactId>

                      <version>2.9</version>

                      <configuration>

                          <version>7</version>

                          <displayName>TestApplication</displayName>

                          <!-- If I want maven to generate the application.xml, set this to true -->

                          <generateApplicationXml>true</generateApplicationXml>

       

                          <defaultJavaBundleDir>/lib</defaultJavaBundleDir>

                          <!--<skinnyWars>true</skinnyWars>-->

                          <modules>

                              <webModule>

                                  <artifactId>app</artifactId>

                                  <groupId>com.application.test</groupId>

                                  <bundleFileName>app.war</bundleFileName>

                                  <contextRoot>/app</contextRoot>

                              </webModule>

                         </modules>

      </plugin>

       

      I already tested to deploy a jboss-web.xml with this:

       

      <jboss-web 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_5_1.xsd">

          <context-root>/app</context-root>

      </jboss-web>

       

      But it does not work neither...

       

      Please I really need to get this working, otherwise I have to back again to JbossAS7

       

      Thank you in advance !!!!!

        • 1. Re: Undertow context path problem deploying application
          Radoslav Husar Master

          Tried with your jboss-web.xml and it all looks good to me.. make sure you are not hitting your browser cache! (hint: use anonymouse browser session, so that no cache is reused)

           

          22:39:52,412 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-7) JBAS017534: Registered web context: /app

           

          Tested on WildFly nightly builds available

          • 2. Re: Undertow context path problem deploying application
            Tomaz Cerar Master

            can post your current undertow subsystem configuration?

            • 3. Re: Undertow context path problem deploying application
              Georges Guyen Newbie

              Hello,

               

               

              I tried Huzar's suggestion and I used a private browser session but it still the same issue

               

              @Tomaz: here is my configuration:

               

                     <subsystem xmlns="urn:jboss:domain:undertow:1.0">
                          <buffer-caches>
                              <buffer-cache name="default" buffer-size="1024" buffers-per-region="1024" max-regions="10"/>
                          </buffer-caches>
                          <server name="default-server">
                              <http-listener name="default" socket-binding="http"/>
                              <host name="default-host" alias="localhost">
                                  <location name="/" handler="welcome-content"/>
                                  <filter-ref name="server-header"/>
                                  <filter-ref name="x-powered-by-header"/>
                              </host>
                          </server>
                          <servlet-container name="default" default-buffer-cache="default" stack-trace-on-error="local-only">
                              <jsp-config/>
                          </servlet-container>
                          <handlers>
                              <file name="welcome-content" path="${jboss.home.dir}/welcome-content" directory-listing="true"/>
                          </handlers>
                          <filters>
                              <response-header name="server-header" header-name="Server" header-value="Wildfly 8"/>
                              <response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow 1"/>
                          </filters>
                      </subsystem>

              • 4. Re: Undertow context path problem deploying application
                Georges Guyen Newbie

                Maybe one hint:

                 

                When I put the absolute path of the welcome jsf page (xhtml) it works, so like this :

                 

                http://192.168.1.12:8080/app/test/login.xhtml   it works !

                 

                So maybe its a problem with my web.xml ? Because it contains the welcome page...

                • 5. Re: Undertow context path problem deploying application
                  asim dogar Newbie

                  hi can you tell me how to append url configuration is save??