7 Replies Latest reply on Feb 15, 2013 8:50 PM by klind

    Test app.. context root... !!!

    klind Newbie

      New to jboss..

      AS7

       

      Created a test app. EAR with ejb module and web module.. But can not get a simple html file displayed

       

      My web.xml :

       

      <?xml version="1.0" encoding="UTF-8"?>

      <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">

      <web-app>

        <listener>

          <listener-class>eu.webtoolkit.jwt.ServletInit</listener-class>

        </listener>

        <!-- This applies only to servlet 3.0 -->

         <session-config>

          <tracking-mode>URL</tracking-mode>

        </session-config>

       

         <servlet>

          <servlet-name>Hello</servlet-name>

          <display-name>JWt Hello World example</display-name>

          <description>JWt Hello World example</description>

          <servlet-class>com.lind.free.HelloMain</servlet-class>

        </servlet>

       

        <servlet>

          <servlet-name>Test</servlet-name>

          <display-name>Test</display-name>

          <description>Test</description>

          <servlet-class>com.lind.free.TestServlet</servlet-class>

        </servlet>

       

        <servlet-mapping>

          <servlet-name>Test</servlet-name>

          <url-pattern>/test</url-pattern>

        </servlet-mapping>

       

        <servlet-mapping>

          <servlet-name>Hello</servlet-name>

          <url-pattern>/hello</url-pattern>

        </servlet-mapping>

       

        </web-app>

       

      and my application.xml

       

      <?xml version="1.0" encoding="UTF-8"?>

      <!DOCTYPE application PUBLIC

                "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"

                "http://java.sun.com/dtd/application_1_3.dtd">

      <application>

        <display-name>ear</display-name>

        <module>

          <web>

            <web-uri>webModule-0.0.1-SNAPSHOT.war</web-uri>

            <context-root>/webModule</context-root>

          </web>

        </module>

        <module>

          <ejb>ejbModule-0.0.1-SNAPSHOT.jar</ejb>

        </module>

      </application>

       

      webModule-0.0.1-SNAPSHOT.war

           -- META-INF

           -- WEB-INF

                -- classes

                -- lib

                web.xml

           index.html

       

      JBoss logs : 11:51:15,803 INFO  [org.jboss.web] (MSC service thread 1-3) JBAS018210: Registering web context: /webModule

       

      http://localhost:8080/webModule/index.html = 404

      http://localhost:8080/webModule = 404

        • 1. Re: Test app.. context root... !!!
          klind Newbie

          I now created a new application.. and the same problem.. Really not anyone else had that problem ???

          • 2. Re: Test app.. context root... !!!
            Nicklas Karlsson Master

            Do you have an index.html file in the war root?

            Do you have any welcome files listed in web.xml

             

            What happens at /webModule/hello?

            • 3. Re: Test app.. context root... !!!
              Stephen Coy Master

              The ASCII art description of your web module structure looks a bit fishy.

               

              What does

               

              jar tf webModule-0.0.1-SNAPSHOT.war

               

              print out?

              • 4. Re: Test app.. context root... !!!
                Nicklas Karlsson Master

                and perhaps a jar tf for the EAR also just in case...

                • 5. Re: Test app.. context root... !!!
                  klind Newbie

                  I have a welcome list in the web.xml ( This is from the new project, the old project is gone )

                   

                   

                  <?xml version="1.0" encoding="UTF-8" ?>

                  <!DOCTYPE web-app (View Source for full doctype...)>

                  <web-app>

                            <servlet>

                                      <servlet-name>greetServlet</servlet-name>

                                      <servlet-class>com.farheap.jsi.dashboard.server.GreetingServiceImpl</servlet-class>

                            </servlet>

                            <servlet-mapping>

                                      <servlet-name>greetServlet</servlet-name>

                                      <url-pattern>/dashboard/greet</url-pattern>

                            </servlet-mapping>

                            <welcome-file-list>

                                      <welcome-file>dashboard.html</welcome-file>

                            </welcome-file-list>

                  </web-app>

                   

                  • 6. Re: Test app.. context root... !!!
                    klind Newbie

                    jar tf jsi-0.0.1-SNAPSHOT.ear

                     

                    META-INF/

                    META-INF/MANIFEST.MF

                    dashboard-0.0.1-SNAPSHOT.war/

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/.junit_symbolMaps/

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/gwt/

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/gwt/standard/

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/gwt/standard/images/

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/gwt/standard/images/ie6/

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/.junit_symbolMaps/

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/gwt/

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/gwt/standard/

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/gwt/standard/images/

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/gwt/standard/images/ie6/

                    dashboard-0.0.1-SNAPSHOT.war/META-INF/

                    dashboard-0.0.1-SNAPSHOT.war/META-INF/maven/

                    dashboard-0.0.1-SNAPSHOT.war/META-INF/maven/com.farheap.jsi/

                    dashboard-0.0.1-SNAPSHOT.war/META-INF/maven/com.farheap.jsi/dashboard/

                    dashboard-0.0.1-SNAPSHOT.war/WEB-INF/

                    dashboard-0.0.1-SNAPSHOT.war/WEB-INF/classes/

                    dashboard-0.0.1-SNAPSHOT.war/WEB-INF/classes/com/

                    dashboard-0.0.1-SNAPSHOT.war/WEB-INF/classes/com/farheap/

                    dashboard-0.0.1-SNAPSHOT.war/WEB-INF/classes/com/farheap/jsi/

                    dashboard-0.0.1-SNAPSHOT.war/WEB-INF/classes/com/farheap/jsi/dashboard/

                    dashboard-0.0.1-SNAPSHOT.war/WEB-INF/classes/com/farheap/jsi/dashboard/client/

                    dashboard-0.0.1-SNAPSHOT.war/WEB-INF/classes/com/farheap/jsi/dashboard/server/

                    dashboard-0.0.1-SNAPSHOT.war/WEB-INF/classes/com/farheap/jsi/dashboard/shared/

                    dashboard-0.0.1-SNAPSHOT.war/WEB-INF/deploy/

                    dashboard-0.0.1-SNAPSHOT.war/WEB-INF/deploy/com.farheap.jsi.dashboard.dashboardJUnit/

                    dashboard-0.0.1-SNAPSHOT.war/WEB-INF/deploy/com.farheap.jsi.dashboard.dashboardJUnit/rpcPolicyManifest/

                    dashboard-0.0.1-SNAPSHOT.war/WEB-INF/deploy/com.farheap.jsi.dashboard.dashboardJUnit/rpcPolicyManifest/manifests/

                    dashboard-0.0.1-SNAPSHOT.war/WEB-INF/deploy/dashboard/

                    dashboard-0.0.1-SNAPSHOT.war/WEB-INF/deploy/dashboard/rpcPolicyManifest/

                    dashboard-0.0.1-SNAPSHOT.war/WEB-INF/deploy/dashboard/rpcPolicyManifest/manifests/

                    dashboard-0.0.1-SNAPSHOT.war/WEB-INF/lib/

                    server-0.0.1-SNAPSHOT.jar/

                    server-0.0.1-SNAPSHOT.jar/com/

                    server-0.0.1-SNAPSHOT.jar/com/farheap/

                    server-0.0.1-SNAPSHOT.jar/com/farheap/jsi/

                    server-0.0.1-SNAPSHOT.jar/com/farheap/jsi/server/

                    server-0.0.1-SNAPSHOT.jar/META-INF/

                    server-0.0.1-SNAPSHOT.jar/META-INF/maven/

                    server-0.0.1-SNAPSHOT.jar/META-INF/maven/com.farheap.jsi/

                    server-0.0.1-SNAPSHOT.jar/META-INF/maven/com.farheap.jsi/server/

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/.junit_symbolMaps/78C63403A80AD69C4E52B057F47148AD.symbolMap

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/.junit_symbolMaps/808465AD657E8BDFD9B21F94CC912A28.symbolMap

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/.junit_symbolMaps/9FD8FABF433DB56D3A008F697596FEEB.symbolMap

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/.junit_symbolMaps/C1DA4B9A1ED5454B2E03CAB11336B7AD.symbolMap

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/.junit_symbolMaps/CAE157BF67A7E65B992CD933686A37F9.symbolMap

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/.junit_symbolMaps/CE44B18A0EAFE62A31B30280C02862C7.symbolMap

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/78C63403A80AD69C4E52B057F47148AD.cache.html

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/808465AD657E8BDFD9B21F94CC912A28.cache.html

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/9FD8FABF433DB56D3A008F697596FEEB.cache.html

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/C1DA4B9A1ED5454B2E03CAB11336B7AD.cache.html

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/CAE157BF67A7E65B992CD933686A37F9.cache.html

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/CE44B18A0EAFE62A31B30280C02862C7.cache.html

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/clear.cache.gif

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/com.farheap.jsi.dashboard.dashboardJUnit.nocache.js

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/E6D6585FAF1E00BF5083DAA3B4B13EDF.gwt.rpc

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/gwt/standard/images/corner.png

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/gwt/standard/images/corner_ie6.png

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/gwt/standard/images/hborder.png

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/gwt/standard/images/hborder_ie6.png

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/gwt/standard/images/ie6/corner_dialog_topleft.png

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/gwt/standard/images/ie6/corner_dialog_topright.png

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/gwt/standard/images/ie6/hborder_blue_shadow.png

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/gwt/standard/images/ie6/hborder_gray_shadow.png

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/gwt/standard/images/ie6/vborder_blue_shadow.png

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/gwt/standard/images/ie6/vborder_gray_shadow.png

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/gwt/standard/images/splitPanelThumb.png

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/gwt/standard/images/vborder.png

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/gwt/standard/images/vborder_ie6.png

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/gwt/standard/standard.css

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/gwt/standard/standard_rtl.css

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/hosted.html

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/junit-standards.html

                    dashboard-0.0.1-SNAPSHOT.war/com.farheap.jsi.dashboard.dashboardJUnit/junit.html

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/.junit_symbolMaps/78C63403A80AD69C4E52B057F47148AD.symbolMap

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/.junit_symbolMaps/808465AD657E8BDFD9B21F94CC912A28.symbolMap

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/.junit_symbolMaps/9FD8FABF433DB56D3A008F697596FEEB.symbolMap

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/.junit_symbolMaps/C1DA4B9A1ED5454B2E03CAB11336B7AD.symbolMap

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/.junit_symbolMaps/CAE157BF67A7E65B992CD933686A37F9.symbolMap

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/.junit_symbolMaps/CE44B18A0EAFE62A31B30280C02862C7.symbolMap

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/78C63403A80AD69C4E52B057F47148AD.cache.html

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/808465AD657E8BDFD9B21F94CC912A28.cache.html

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/9FD8FABF433DB56D3A008F697596FEEB.cache.html

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/C1DA4B9A1ED5454B2E03CAB11336B7AD.cache.html

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/CAE157BF67A7E65B992CD933686A37F9.cache.html

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/CE44B18A0EAFE62A31B30280C02862C7.cache.html

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/clear.cache.gif

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/dashboard.nocache.js

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/E6D6585FAF1E00BF5083DAA3B4B13EDF.gwt.rpc

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/gwt/standard/images/corner.png

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/gwt/standard/images/corner_ie6.png

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/gwt/standard/images/hborder.png

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/gwt/standard/images/hborder_ie6.png

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/gwt/standard/images/ie6/corner_dialog_topleft.png

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/gwt/standard/images/ie6/corner_dialog_topright.png

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/gwt/standard/images/ie6/hborder_blue_shadow.png

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/gwt/standard/images/ie6/hborder_gray_shadow.png

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/gwt/standard/images/ie6/vborder_blue_shadow.png

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/gwt/standard/images/ie6/vborder_gray_shadow.png

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/gwt/standard/images/splitPanelThumb.png

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/gwt/standard/images/vborder.png

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/gwt/standard/images/vborder_ie6.png

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/gwt/standard/standard.css

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/gwt/standard/standard_rtl.css

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/hosted.html

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/junit-standards.html

                    dashboard-0.0.1-SNAPSHOT.war/dashboard/junit.html

                    dashboard-0.0.1-SNAPSHOT.war/dashboard.css

                    dashboard-0.0.1-SNAPSHOT.war/dashboard.html

                    dashboard-0.0.1-SNAPSHOT.war/index.html

                    dashboard-0.0.1-SNAPSHOT.war/META-INF/MANIFEST.MF

                    dashboard-0.0.1-SNAPSHOT.war/META-INF/maven/com.farheap.jsi/dashboard/pom.properties

                    dashboard-0.0.1-SNAPSHOT.war/META-INF/maven/com.farheap.jsi/dashboard/pom.xml

                    dashboard-0.0.1-SNAPSHOT.war/WEB-INF/classes/com/farheap/jsi/dashboard/client/dashboard$1.class

                    dashboard-0.0.1-SNAPSHOT.war/WEB-INF/classes/com/farheap/jsi/dashboard/client/dashboard$1MyHandler$1.class

                    dashboard-0.0.1-SNAPSHOT.war/WEB-INF/classes/com/farheap/jsi/dashboard/client/dashboard$1MyHandler.class

                    dashboard-0.0.1-SNAPSHOT.war/WEB-INF/classes/com/farheap/jsi/dashboard/client/dashboard.class

                    dashboard-0.0.1-SNAPSHOT.war/WEB-INF/classes/com/farheap/jsi/dashboard/client/GreetingService.class

                    dashboard-0.0.1-SNAPSHOT.war/WEB-INF/classes/com/farheap/jsi/dashboard/client/GreetingServiceAsync$Util.class

                    dashboard-0.0.1-SNAPSHOT.war/WEB-INF/classes/com/farheap/jsi/dashboard/client/GreetingServiceAsync.class

                    dashboard-0.0.1-SNAPSHOT.war/WEB-INF/classes/com/farheap/jsi/dashboard/client/Messages.class

                    dashboard-0.0.1-SNAPSHOT.war/WEB-INF/classes/com/farheap/jsi/dashboard/client/Messages.properties

                    dashboard-0.0.1-SNAPSHOT.war/WEB-INF/classes/com/farheap/jsi/dashboard/client/Messages_fr.properties

                    dashboard-0.0.1-SNAPSHOT.war/WEB-INF/classes/com/farheap/jsi/dashboard/dashboard.gwt.xml

                    dashboard-0.0.1-SNAPSHOT.war/WEB-INF/classes/com/farheap/jsi/dashboard/server/GreetingServiceImpl.class

                    dashboard-0.0.1-SNAPSHOT.war/WEB-INF/classes/com/farheap/jsi/dashboard/shared/FieldVerifier.class

                    dashboard-0.0.1-SNAPSHOT.war/WEB-INF/deploy/com.farheap.jsi.dashboard.dashboardJUnit/rpcPolicyManifest/manifest.txt

                    dashboard-0.0.1-SNAPSHOT.war/WEB-INF/deploy/com.farheap.jsi.dashboard.dashboardJUnit/rpcPolicyManifest/manifests/FB41872F0355DAC5F190E253CA5A1D76.txt

                    dashboard-0.0.1-SNAPSHOT.war/WEB-INF/deploy/dashboard/rpcPolicyManifest/manifest.txt

                    dashboard-0.0.1-SNAPSHOT.war/WEB-INF/deploy/dashboard/rpcPolicyManifest/manifests/FB41872F0355DAC5F190E253CA5A1D76.txt

                    dashboard-0.0.1-SNAPSHOT.war/WEB-INF/lib/gwt-servlet-2.5.0.jar

                    dashboard-0.0.1-SNAPSHOT.war/WEB-INF/web.xml

                    META-INF/application.xml

                    server-0.0.1-SNAPSHOT.jar/com/farheap/jsi/server/App.class

                    server-0.0.1-SNAPSHOT.jar/META-INF/MANIFEST.MF

                    server-0.0.1-SNAPSHOT.jar/META-INF/maven/com.farheap.jsi/server/pom.properties

                    server-0.0.1-SNAPSHOT.jar/META-INF/maven/com.farheap.jsi/server/pom.xml

                    META-INF/maven/

                    META-INF/maven/com.farheap.jsi/

                    META-INF/maven/com.farheap.jsi/ear/

                    META-INF/maven/com.farheap.jsi/ear/pom.xml

                    META-INF/maven/com.farheap.jsi/ear/pom.properties

                     

                    • 7. Re: Test app.. context root... !!!
                      klind Newbie

                      Ahhh.. the reason was the war was exploded inside the ear file.

                      <webModule>

                                                                                            <groupId>com.farheap.jsi</groupId>

                                                                                            <artifactId>dashboard</artifactId>

                                                                                            <unpack>true</unpack>

                      </webModule>

                       

                      I was just thinking it should be possible to deploy it exploded.. You can do that on Weblogic