Specifying Struts in the web.xml DD

As far as the Container is concerned, the ActionServlet is just another servlet. So, you have to declare it and make sure all of the web app’s requests are mapped to it.

image with no caption

Note

You should name the Struts DD “struts-config.xml”

And if you do NOT, then in your web.xml DD, you MUST declare an init-param “config”, to define the name of the Struts DD. If you DO use the name “struts-config.xml”, then Struts will find it automatically, without an init-parameter, but it’s still considered “good practice” to declare it in the DD.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset