Explain deployment descriptor(web.xml) configuration for struts application ?

Action Servlet and strtus-config.xml files and configured as below

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

This config parameter tells the Strut’s Action Servlet where to find its central configuration file struts-config.xml

<servlet-mapping>
             <servlet-name>action</servlet-name>
             <url-pattern>*.do</url-pattern>
<servlet-mapping>

In servlet mapping <url-pattern> tag is sayinng that ActionServlet should process any requests for pages thats end in .do

Tag Library descriptors will be configured as below

<taglib>
<taglib-uri> /WEB-INF/tlds/struts-bean.tld</taglib-uri>
<taglib-location> /WEB-INF/tlds/struts-bean.tld</taglib-location>
</taglib>

Simillarly struts-html.tld,struts-logic.tld will be configured

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: