Web tier: servlets, JSP, Web frameworks: Multiple action servlet mapping in Struts

  1. Multiple action servlet mapping in Struts (2 messages)

    How can i have two servlets both extends from ActionServlet class and having different action mapping in web.xml.

    say I create Servlet1 extends ActionServlets and it maps to *.do

    and I create another one, Servlet2 extends ActionServlet and it maps to *.au

    Is it possible to do this in Struts?. If it is do able then, how struts resolves the following line:

    <html:form action="/Report" method="post>

    If you notice, the above action doesn't say which servlet to pick up.
  2. I am not sure you should be doing it. The Struts docs clearly state that you should have one ActionServlet only. A better option would be to split up the app into sub modules.
  3. Thank you[ Go to top ]

    yea, I guess I shouldn't be doing it as per the spec. thanks.