Announcement Announcement Module
No announcement yet.
Spring/Struts integration Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring/Struts integration

    I'm having a problem integrating Spring 2.5 and Struts 1.3. The application was written in Struts and has many, many actions defined. I am trying to bring Spring into the picture. I have not seen this particular posting in the Spring forum, either.

    I have followed, carefully, the directions to integrate Spring and Struts given by George Franciscus in his article on IBM DeveloperWorks (since this is my first thread I am not allowed to post the link to the article titled "Get a better handle on Struts actions, with Spring").

    In my web.xml file we have an action servlet defined :

    ... more

    In one of many Struts config files we have :

    <action path="/logon"
    type="org.springframework.web.struts.DelegatingAct ionProxy"

    <forward name="success" path="/" redirect="true" />
    <forward name="uw-success" path="/" redirect="true" />
    <forward name="admin-success" path="/" redirect="true" />
    <forward name="ins-success" path="/" redirect="true" />
    <forward name="payroll-success" path="/" redirect="true" />

    <forward name="self" path="/" redirect="true" />
    <forward name="fail" path="/jsp/common/LogonMessage.jsp"/>
    <forward name="pw_old" path="/jsp/common/PasswordOld.jsp"/>
    ... more

    <!-- And down near the bottom of the Struts config file... -->

    <plug-in className="org.springframework.web.struts.ContextL oaderPlugIn"/>


    In my action-servlet.xml file I have only one bean to proxy (for the action above) :

    <beans xmlns=""
    <bean name="/logon"

    When I start Tomcat 6 I get the following stack trace :

    SEVERE: Servlet /eQuotes threw load() exception
    at org.apache.struts.action.ActionServlet.initModuleP lugIns(
    at org.apache.struts.action.ActionServlet.init(Action
    at javax.servlet.GenericServlet.init(GenericServlet.j ava:212)
    at org.apache.catalina.core.StandardWrapper.loadServl et(
    at org.apache.catalina.core.StandardWrapper.load(Stan
    at org.apache.catalina.core.StandardContext.loadOnSta rtup(
    at org.apache.catalina.core.StandardContext.start(Sta
    at org.apache.catalina.core.ContainerBase.addChildInt ernal(
    at org.apache.catalina.core.ContainerBase.addChild(Co
    at org.apache.catalina.core.StandardHost.addChild(Sta
    at org.apache.catalina.startup.HostConfig.deployDescr iptor(
    at org.apache.catalina.startup.HostConfig.deployDescr iptors(
    at org.apache.catalina.startup.HostConfig.deployApps(
    at org.apache.catalina.startup.HostConfig.start(HostC
    at org.apache.catalina.startup.HostConfig.lifecycleEv ent(
    at org.apache.catalina.util.LifecycleSupport.fireLife cycleEvent(
    at org.apache.catalina.core.ContainerBase.start(Conta
    at org.apache.catalina.core.StandardHost.start(Standa
    at org.apache.catalina.core.ContainerBase.start(Conta
    at org.apache.catalina.core.StandardEngine.start(Stan
    at org.apache.catalina.core.StandardService.start(Sta
    at org.apache.catalina.core.StandardServer.start(Stan
    at org.apache.catalina.startup.Catalina.start(Catalin
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De
    at java.lang.reflect.Method.invoke(
    at org.apache.catalina.startup.Bootstrap.start(Bootst
    at org.apache.catalina.startup.Bootstrap.main(Bootstr


    Does anybody have any idea why I am seeing this and what I should do about it?



  • #2
    This isn't the correct forum for this question. This forum is for the Spring Integration (message bus) project.

    You'll probably have better luck in the "Web" forum.



    • #3
      actual help

      Originally posted by mpilone View Post
      This isn't the correct forum for this question. This forum is for the Spring Integration (message bus) project.

      You'll probably have better luck in the "Web" forum.

      Which proves how spectacularly misnamed this project is. Google "spring integration" and see what you get.

      Now to help instead of scolding the OP.

      I wrote a blog post on using Struts1 with Spring 2.5. You don't need that annoying un-dry (wet?) multiple declaration of your actions.
      Hope it will help you.


      • #4
        That's a great blog post. Please *do* be sure to post a link to that in the web forum


        • #5

          Thank you, everybody.

          I discovered that my problem had to do with the ContextLoaderPlugIn class not being found (although Tomcat did not report that in my stack trace until I added something else to the Struts config file!).

          Gene, I liked your blog post. Thank you.

          I will be sure to post my future questions in the web forum.