It's a servlet mapping that maps the requests. Please note that "/" in front of your url-pattern is required in order to map the requests correctly. In you case you should replace
<servlet-mapping> <servlet-name>action</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> With <servlet-mapping> <servlet-name>action</servlet-name> <url-pattern>/*.do</url-pattern> </servlet-mapping> All the request that have *.do pattern will be forward to org.apache.struts.action.ActionServlet -----Original Message----- From: Chang Ming Chye [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 07, 2004 3:21 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RequestProcessor handling http requests Hi, How does struts handle incoming request and routes it to the correct action? For example, if I declare my web.xml as: <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> <servlet-mapping> <servlet-name>action</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> and in my struts-config.xml file I have the following action declared: <action path="/searchAction" ... > When the http request "*/searcAction.do" is received by the Action Servlet, how is the actual action "/searchAction" as specified retrieved? Which method of the RequestProcessor actually removed the extension ".do" from the request? Furthermore, if the URL-pattern of my servlet-mapping is specified as "/do/*" instead of "*.do" are the request mapped again to the actions specified? Thanks. __________________________________________________ Do You Yahoo!? Log on to Messenger with your mobile phone! http://sg.messenger.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] “This e-mail is sent on the Terms and Conditions that can be accessed by Clicking on this link http://www.vodacom.net/legal/email.asp " --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]