Configure struts-config.xml into web.xml

The main xml file of an web based application is wb.xml file.when request come from client then first web.xml is call by server .On the behalf of configurations into web.xml the server performs some task and lastly give response to client. For struts based application struts-config.xml and web.xml are required .We must have configure struts-config.xml into web.xml so that when request come from client then struts-config.xml file will loaded. Here we will learn how to configure struts-config.xml into web.xml.


To configure struts-config.xml file into web.xml see following code


action
org.apache.struts.action.ActionServlet

config
/WEB-INF/struts-config.xml

validating
true.
Here at time of Standard Action Servlet Configuration in web.xml we have to configure struts-config.xml.
This is because load struts-config.xml at time of call ActionServlet .

We can add more than one struts-config.xml file by creating sub-modules.

e.g.  Say we have two module report module and hr module .

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More