5 Replies Latest reply on May 14, 2002 9:01 AM by Joolz Fawcett

    404 error with deployed web applications

    Joolz Fawcett Newbie

      I have built an ear file which contains 2 web applications. When I deploy them in Jboss/Tomcat (JBoss-2.4.4_Tomcat-4.0.1) everything appears to deploy successfully. There are no errors reported in server.log.

      But when I try to access either of the web apps through my browser I get a 404 error, e.g. when I try "http://localhost:8080/xfactory/index.htm" I get the error "The requested resource (/xfactory/index.htm) is not available".

      It seems that Tomcat is aware of the web application, because this error is different from what I get if I try some other url that I know is wrong like "http://localhost:8080/foo/index.htm". Then as I would expect I get a 500 error : "No Context configured to process this request".

      Has anyone got any ideas what I am doing wrong?

      Thanks
      Joolz

        • 1. Re: 404 error with deployed web applications
          Joolz Fawcett Newbie

          I have made some progress since my original message. I just added a very simple HelloWord servlet and HelloWorld jsp to one of the web applications. The servlet works fine, but i get the 404 error if I try the jsp.

          Maybe I'm just being dumb and putting the jsps in the wrong place. I thought they go into the root of the web archive.

          This web app works fine under Orion.

          • 2. Re: 404 error with deployed web applications
            frank starsinic Newbie

            why don't you do a
            jar -tf woohoo.war
            and re-post the output back in the forum.

            to me it sounds like you're doing it right though.
            you can certainly have your html and jsp in the same
            dir at the root.

            here is my latest .war tree...

            META-INF/
            META-INF/MANIFEST.MF
            WEB-INF/
            WEB-INF/lib/
            index.html
            test.jsp
            WEB-INF/web.xml

            • 3. Re: 404 error with deployed web applications
              Joolz Fawcett Newbie

              Thanks for trying to help. Below is the jar -tf output for my war. The jsps and htms are in the archive root.

              Something that is puzzling me about Tomcat under Jboss is that the whole "website" for a web applications seems to be transient. It gets unwrapped from the war into a temporary folder when you start Jboss and gets destroyed when you stop Jboss. This is very different from what I have been used to working with Orion up to now. Orion unwraps the war into a permanent folder into which you can add additional content that wasn't in the war file.

              Is there any way you can configure Jboss/Tomcat to unwrap into a permanent folder?

              META-INF/
              images/
              include/
              WEB-INF/
              WEB-INF/classes/
              WEB-INF/classes/com/
              WEB-INF/classes/com/espritsoutron/
              WEB-INF/classes/com/espritsoutron/beans/
              WEB-INF/classes/com/espritsoutron/beans/xdirectory/
              WEB-INF/classes/com/espritsoutron/servlets/
              WEB-INF/classes/com/espritsoutron/servlets/xdirectory/
              WEB-INF/lib/
              ElementTemplateForm.jsp
              xfactory.css
              UsersInit.jsp
              AssociationInstanceForm.jsp
              ElementInstancesList.jsp
              UserGroupsInit.jsp
              XfactoryFormButtons.jsp
              JoolzTest3.jsp
              AuthorityDefinitionInit.jsp
              QualifierDefinitionInit.jsp
              RecordDefinitionForm.jsp
              MethodDefinitionInit.jsp
              AuthorityInstanceInit.jsp
              QualifierInstanceForm.jsp
              AssociationDefinitionInit.jsp
              images/view.gif
              images/cart.gif
              images/xdirectory_small_blue.gif
              images/lock.gif
              images/delete.gif
              include/multivalue.js
              include/action.js
              include/.nbattrs
              NamespaceForm.jsp
              PermissionsInit.jsp
              XfactoryFooter.jsp
              DataTypePrompts.jsp
              DatabaseForm.jsp
              JoolzTest.jsp
              ElementTemplatesPrompt.jsp
              PermissionDefinitionInit.jsp
              XfactoryHeader.jsp
              ReturnTypePrompts.jsp
              UsersForm.jsp
              JoolzTest2.jsp
              MethodScriptPrompts.jsp
              UserGroupsForm.jsp
              GroupsInit.jsp
              AuthorityDefinitionForm.jsp
              logout.jsp
              QualifierDefinitionForm.jsp
              ElementDefinitionInit.jsp
              MethodDefinitionForm.jsp
              RecordInstanceInit.jsp
              AssociationDefinitionForm.jsp
              AuthorityInstanceForm.jsp
              PermissionsForm.jsp
              ElementTemplateInit.jsp
              PermissionDefinitionForm.jsp
              AssociationInstanceInit.jsp
              ElementDefinitionsList.jsp
              loginbox.jsp
              LanguagePrompt.jsp
              GroupsForm.jsp
              XfactoryHtmlHead.jsp
              index.htm
              RecordDefinitionInit.jsp
              ElementDefinitionForm.jsp
              AuthorityPrompts.jsp
              index.jsp
              QualifierInstanceInit.jsp
              RecordInstanceForm.jsp
              MethodTypePrompts.jsp
              NamespaceInit.jsp
              DatabaseInit.jsp
              login.jsp
              HelloWorld.jsp
              WEB-INF/classes/com/espritsoutron/beans/xdirectory/UserGroupsBean.class
              WEB-INF/classes/com/espritsoutron/beans/xdirectory/AssociationDefinitionBean.class
              WEB-INF/classes/com/espritsoutron/beans/xdirectory/LanguageCodeBean.class
              WEB-INF/classes/com/espritsoutron/beans/xdirectory/NamespaceBean.class
              WEB-INF/classes/com/espritsoutron/beans/xdirectory/AssociatedInstanceBean.class
              WEB-INF/classes/com/espritsoutron/beans/xdirectory/ElementTemplateBean.class
              WEB-INF/classes/com/espritsoutron/beans/xdirectory/ElementDefinitionBean.class
              WEB-INF/classes/com/espritsoutron/beans/xdirectory/DatabaseBean.class
              WEB-INF/classes/com/espritsoutron/beans/xdirectory/RecordDefinitionBean.class
              WEB-INF/classes/com/espritsoutron/beans/xdirectory/MethodDefinitionBean.class
              WEB-INF/classes/com/espritsoutron/beans/xdirectory/RecordInstanceBean.class
              WEB-INF/classes/com/espritsoutron/beans/xdirectory/ElementInstanceBean.class
              WEB-INF/classes/com/espritsoutron/beans/xdirectory/AclBean.class
              WEB-INF/classes/com/espritsoutron/beans/xdirectory/AssociationInstanceBean.class
              WEB-INF/classes/com/espritsoutron/beans/xdirectory/QualifierInstanceBean.class
              WEB-INF/classes/com/espritsoutron/beans/xdirectory/AssociatableDefinitionBean.class
              WEB-INF/classes/com/espritsoutron/beans/xdirectory/GroupBean.class
              WEB-INF/classes/com/espritsoutron/beans/xdirectory/UserBean.class
              WEB-INF/classes/com/espritsoutron/beans/xdirectory/PermissionDefinitionBean.class
              WEB-INF/classes/com/espritsoutron/beans/xdirectory/AuthorityDefinitionBean.class
              WEB-INF/classes/com/espritsoutron/beans/xdirectory/AuthorityInstanceBean.class
              WEB-INF/classes/com/espritsoutron/beans/xdirectory/QualifierDefinitionBean.class
              WEB-INF/classes/com/espritsoutron/servlets/xdirectory/HelloWorldServlet.class
              WEB-INF/classes/com/espritsoutron/servlets/xdirectory/RecordDefinitionAction.class
              WEB-INF/classes/com/espritsoutron/servlets/xdirectory/PermissionDefinitionAction.class
              WEB-INF/classes/com/espritsoutron/servlets/xdirectory/AssociationDefinitionAction.class
              WEB-INF/classes/com/espritsoutron/servlets/xdirectory/PermissionsAction.class
              WEB-INF/classes/com/espritsoutron/servlets/xdirectory/ElementDefinitionAction.class
              WEB-INF/classes/com/espritsoutron/servlets/xdirectory/UsersAction.class
              WEB-INF/classes/com/espritsoutron/servlets/xdirectory/MethodDefinitionAction.class
              WEB-INF/classes/com/espritsoutron/servlets/xdirectory/NamespaceAction.class
              WEB-INF/classes/com/espritsoutron/servlets/xdirectory/QualifierDefinitionAction.class
              WEB-INF/classes/com/espritsoutron/servlets/xdirectory/UserGroupsAction.class
              WEB-INF/classes/com/espritsoutron/servlets/xdirectory/RecordInstanceAction.class
              WEB-INF/classes/com/espritsoutron/servlets/xdirectory/DatabaseAction.class
              WEB-INF/classes/com/espritsoutron/servlets/xdirectory/EJBTestServlet.class
              WEB-INF/classes/com/espritsoutron/servlets/xdirectory/AuthorityInstanceAction.class
              WEB-INF/classes/com/espritsoutron/servlets/xdirectory/AuthorityDefinitionAction.class
              WEB-INF/classes/com/espritsoutron/servlets/xdirectory/AssociationInstanceAction.class
              WEB-INF/classes/com/espritsoutron/servlets/xdirectory/GroupsAction.class
              WEB-INF/classes/com/espritsoutron/servlets/xdirectory/ElementTemplateAction.class
              WEB-INF/classes/com/espritsoutron/servlets/xdirectory/QualifierInstanceAction.class
              WEB-INF/web.xml
              WEB-INF/struts-form.tld
              WEB-INF/struts-html.tld
              WEB-INF/struts-logic.tld
              WEB-INF/struts.tld
              WEB-INF/struts-bean.tld
              WEB-INF/struts-template.tld
              WEB-INF/lib/struts.jar
              WEB-INF/lib/utiltags.jar
              HelloWorld.htm
              META-INF/MANIFEST.MF

              • 4. Re: 404 error with deployed web applications
                Adrian Brock Master

                You can do that with jboss2.4.4, but you have to tell
                jboss to do it.
                Create the directory structure you posted above in
                directory ${jboss.home}/deploy/xfactory.war
                The .war on the end is important.

                I don't know why it isn't working with a packed war.
                Looks ok to me, although you haven't posted your web.xml

                Regards,
                Adrian

                • 5. Re: 404 error with deployed web applications
                  Joolz Fawcett Newbie

                  Thanks for the tip re deploying 'war' directories Adrian.

                  I have solved the problem of the jsps not working. Feeling rather embarassed really. It was a jar file that I had added to the lib/ext folder which was causing the problem. I removed the jar and everything started working.