I can see that you have a config file in which you define the different jsps and their handlers in Struts. I have a feeling as the system becomes more and more complex, it can be maintenance hazard to refer or maintain a XML for the list of jsps involved in the system. Is it possible to extend the basic Action... class to look into a database table with a combination of jsp, handler details compared to getting info from XML. I am saying this in case of a system where there are about > 1000 jsps. Thanks, Kishore.
Kishore, I dont know if there is any tool currently available to store the struts-config metadata in database. Even database will not solve the problem since with struts-config, you'd always want to visualize the flow from one ActionMapping to other as per the business requirements. If the struts-config.xml is getting bigger and unmanageable, then its time to break it into multiple application modules - each with its own struts-config.xml. Consider having a application module per usecase. Since you tend to organize jsps related to one usecase in a directory (or subdirectories), it goes well with the approach of multiple Struts application modules. The best part is that you can do it incrementally. BTW, I like to use the Struts Console by James Holmes to manage the struts-config.xml. Its easy & intutive and has no IDE dependency.
My two cents: So many pages denotes probably an "old school" Model 1 application. Consider that when you port an application from JSP (Model 1), application ) to an MVC framework like struts, a lot of JSPs become useless. This is due to the shift of the business logic from JSPs into the "Actions". Actions are more pratical than JSP to handle and maintain application logic, to access databases, to do some exception handling and recovering. Yes, you will have a proliferation of Actions, but an higher reduction of JSP pages number. Later, use Struts with a template engine like Tiles and that number will decrease again, too.
Fabrizio Gianneschi<br />SCPJ2, SCWCD, SCBCD
posted 16 years ago
Originally posted by Fabrizio Gianneschi: My two cents: So many pages denotes probably an "old school" Model 1 application. Consider that when you port an application from JSP (Model 1), application ) to an MVC framework like struts, a lot of JSPs become useless.
I once worked on a massive application that had about 700 JSPs (and corresponding references in struts-config.xml) that was perfectly Model2, but were using Struts 1.0. It was fun migrating to Struts 1.1 But what you say is generally true.
More JSPs does not always point to old school or model 1. The system I am talking about for sure uses MVC and is designed before Struts even is used commercially. What if each JSP has its own differentiating factor(with respect to functionality) and the scale of the project is beyond the imagination of you guys Kishore. [ March 18, 2004: Message edited by: Kishore Dandu ]