Working on a project where we are taking over the code base from another company. They used Struts. The struts-config.xml is 6114 lines long. How do you struts lovers justify a configuration file that large and claim that Struts simplifies anything?
Have you ever seen an application written entirely with JSPs where all the logic, including Database access was written in scriptlets?
I have. It's not pretty.
How, then can you say that J2EE Web technology is any good, since it can be abused so badly?
The same is true of Struts. The fact that you can abuse it doesn't make it a bad technology.
Having such a large config file is not ideal. If it were my application, I'd look at breaking it up into modules, each with it's own config file.
On the other hand, what's the big deal about it being so big? The real question is "How easily can I find the information I need about this application?"
If I as a Struts developer encounter a URL of /doThis.do, all Ineed to do is open the config file, hit <ctrl>F, search for path="/doThis" and I immediately have a wealth of information about what is going on with that URL.
I can only imagine how unwieldy such an applicaiton would be without some sort of overriding framework to keep it organized. How big would the web.xml file be if every action defined in the Struts config file were a Servlet?
You can argue that other frameworks might be better/faster/cooler/sexier. Fine. Maybe they are. If I find a better one, I'll use it. The point I'm making is that most Struts applications, with all their faults, are better and more organized for having used Struts than they would be without it.
I think in those situations where struts-config file is bocoming very large, we can break config in different modules and then each module will have its own configuration file like struts-config-A.xml, struts-config-B.xml etc.
A 6000+ line configuration file? I wonder how long ago my project passed that mark...it is now close to the 18,000 range. Maybe that is not ideal, but it has not cause any real problems.
Several years ago I worked on several major eCommerce web sites built with Broadvision. We used presentation technology similar to JSP (I believe that Brodvision licensed LiveScript from Netscape which was the precursor to JSP). We had JSP pages that were several thousand lines long. Talk about hard to maintain!