|
|
|
| HOME | J2ME | Struts | AJAX | SOAP | SOA | MEDIA STREAMING | AXIS | | |
|
|
Struts for Beginners: Dot do(.do) and Action ServletBack | Tutorial Home | Next Lets investigate the deployment descriptor WEB-INF/web.xml for struts. You will find following xml configurations. <!-- Standard Action Servlet Mapping --> The above servlet-mapping configuration says that what ever request that comes with a mime type .do should go to servlet called action. And the servlet action is defined in the below configuration. The action is the alias name of the servlet org.apache.struts.action.ActionServlet. This ActionServlet is the Struts controller and extends HTTPServlet class. <!-- Standard Action Servlet Configuration --> Any other extension other than .do can be used by configuring accordingly in web.xml. ActionServlet Now that your request has reached the ActionServet class. What Next? ActionServlet performs following tasks
Struts Configuration File struts-config.xml Struts Configuration File defines all the mappings required by a Struts application like controller actions, redirects, resource information, validations, Form Beans, data sources etc. This is the file where the process flow of the Struts application is defined. Action class is a where the various tasks to be performed for an incoming request are defined. The controller (ActionServlet) will call an Action for each request based on the below action-mappings. Set the following mappings in the struts-config.xml. <action-mappings> Back | Tutorial Home | Next site comments powered by Disqus |
|
| toolbar powered by Conduit |
|
| Copyright © 2009. All rights reserved | Terms and Conditions | About | Contact | Feed Back | |