It has been a quite a while i am learning Servlets and Jsp and i am happy that i have rised from Level 0 to Levl 8 out of 10. Thanks for Kathy and Bert for their wonderful book on JSP and Servlets.
While i was reading that book , three questions in my mind and those are the questions which is irritating me. Would appreciate if everyone here who are at their best level please explain answer to my question.
1) if i have 1000 Servlets , do i have to provide servlet and servlet-mapping for all those 1000 Servlets ? There isnt a way out to this ?
2) If web.xml (Deployment Descriptor ) file becomes huge enough , is there a way we can define more then 1 web.xml file i.e divide them. The similar sort of thing i have seen in Struts wherein if struts-config.xml file goes huge , we divide it in 2 parts. Is there a way out for web.xml as well ?
3) For the welcome-file-list , Can i provide something like Test.do which actually would be pointing to some servlet defined up in the servlet element in DD ?
Our expert's opinions would be very much appreciated.
Thanks in Advance.
Yogendra N Joshi.
Meri Zindagi Hain Tab Tak.. Jab Tak Tera Sahara.... Har Taraf Tu Hi Tu Hain SAI Tera Hi Hain Nazara.....
I haven't tried that providing something like Test.do into the welcome-file-list ,so I don't know it work or not. But , if you want to use Test.do as your welcome-file,you can do like this: provide a index.html ,set it into the welcome-file , and in the body :
Originally posted by Rahul Bhattacharjee: In that case you would be going for some MVC framework , like Struts and struts has a Front Controller.
Or just a simple Front Controller. I don't think it's ever necessary to have to take on a monster like Struts.
Joined: Nov 29, 2005
Considering the web application under consideration to be very big ,we can make use of a lot of features that struts provides apart form Front Controller , like validation , slitted struts-file (related to second point of the original post) , etc.
And apart from the 1000 servlets of the application , if any more servlets are required to be added at later point of time then it can be added without much issues and maintaining the application would become much easier.
All of those features are just as relevant or irrelevant for small as for large apps. I continue to contend that just because an application gets "big" that it does not need an over-engineered behemoth like Struts to maintain.