actions are not servlets right? then why do i have to add servlet elements for the action classes in my web.xml? but in my project they have added only the servlets in the web.xml not the actions... can anyone please explain it??
Action are not servlets, correct. But there is an ActionServlet (the "controller") that determines what action will handle each request. It's configured in the web.xml because that's where you configure servlets.
Actions are configured in the Struts configuration file because they're framework-specific classes--nothing to do with default Java web application mechanisms. They *could* have used a configuration mechanism that leveraged the web.xml file, I suppose (although I'm not sure if that capability existed when Struts 1 first came about), but it's separate, which makes sense to me.
Prakash Mani - Attur
posted 9 years ago
sorry.. i have removed the servlet elements from the web.xml except the actionservlet, that worked fine..its my mis understanding... can anyone please tell what are the init params we can have in servlet element in the web.xml...