-
Junior Member
Re: servlet - struts
We define the name & path of the Action Servlet in the Web.xml.Web.xml is the deployment descriptor of the application. Thus,whenever any request has been made by submitting the JSP page control goes to the action servlet.Action Servlet intercepts & process the request by forwarding it to Model. Thus, in this way it acts as a controller.
-
Banned
Re: servlet - struts
In web.xml ur specifying the servlet name 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>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
i.e wtever request comes from the brower , comes to web.xml and maps to org.apache.struts.action.ActionServlet(this is already implemented by apache).This ActionServlet will act as a controller . ActionServlet uses the initialization parameters /WEB-INF/struts-config.xml and send to particular Action
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules