1 Reply Latest reply on Oct 3, 2002 4:35 PM by Jim Boone

    Problem finding struts-config.xml file with embeded Tomcat

    Jim Boone Newbie

      Hi,

      I am trying to port a web app to the standard JBoss 3.0.2/Tomcat release and have run into a problem. For some reason, when the struts Controller servlet attempts to load its configuration file, it can't find it. The web.xml entry works fine under a standalone Tomcat. Why doesn't it work under JBoss? Any ideas are appreciated

      ===web.xml===
      ...

      <servlet-name>action</servlet-name>
      <display-name>Struts Controller</display-name>
      <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
      <init-param>
      <param-name>application</param-name>
      <param-value>ApplicationResources</param-value>
      </init-param>
      <init-param>
      <param-name>config</param-name>
      <param-value>WEB-INF/struts-config.xml</param-value>
      </init-param>
      ....

      === Error Message ==
      14:41:16,196 ERROR [Engine] StandardContext[/websvc]: Servlet /websvc threw load
      () exception
      javax.servlet.UnavailableException: Missing configuration resource for path WEB-
      INF/struts-config.xml
      at org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java
      :1317)
      at org.apache.struts.action.ActionServlet.init(ActionServlet.java:466)
      at javax.servlet.GenericServlet.init(GenericServlet.java:256)
      at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
      java:918)
      at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:81
      0)
      at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
      t.java:3279)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:3
      421)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:78

        • 1. Re: Problem finding struts-config.xml file with embeded Tomc
          Jim Boone Newbie

          OK, I will answer my own question. When I attemped to simply drop a war file into the deploy directory, my web site did not operate properly (at least one file was missing from the root context of the site, probably more). When I created a new directory in the deploy directory as such 'websvc.war', and copied the web app files under this directory, everything worked great! I don't know why, I simply copied what the authors of the jmx-console web site did. Did I miss this in documentation somewhere? Why does this work while a plain war file does not?