Search code examples
javajakarta-eestruts2struts-config

Not able to configure Struts in my system


I have installed Eclipse Heloios3.6 and Tomcat 6.0 and jdk 1.6.

Can you give the library files for struts and configuration file for struts namely struts-config.xml and web.xml?

While I tried to run struts, it shows the requested resource is not available error.


Solution

  • Assuming you mean Struts 2, did you have a look here: http://struts.apache.org/2.x/docs/home.html?

    The core part of web.xml is this:

    <filter>
     <filter-name>struts2</filter-name>
     <filter-class>
      org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
     </filter-class>
    
     <init-param>
      <param-name></param-name>
      <param-value></param-value>
     </init-param>
    </filter>
    
    <filter-mapping>
     <filter-name>struts2</filter-name>
     <url-pattern>/*</url-pattern>
     <dispatcher>REQUEST</dispatcher>
     <dispatcher>FORWARD</dispatcher>
    </filter-mapping>
    

    Then there's a struts.xml in your classpath, not a struts-config.xml (although you might be able to configure the lookup).