(NOTE: All Jsps in your web app gets converted into Servlets!...but don't worry for that.)
In FC framework, you have only one servlet and all the requests are dispatched to the proper Action Classes based on the mapping in your struts-config.xml.
Let me write my own FrontController..I am not going to use any .xml file..I will be hardcoding :-)
Public class MyFrontControllerServlet{
public void execute()
{
if(requestparam == 'add') {
Call ActionClass1();
}
else if (requestparam == 'delete')
{
Call ActionClass2();
}
.
.
.
.
.
}
}
Very simple!! You can write your application in one servlet + JSPs (JSPs get converted into servlets internally by Jasper engine.)
This is my crazy thinking. Please don’t do this, otherwise you might get fired .