piyush raj jain wrote:
> i understand that i should not leave any possibilties of bypassing the controller
>servlet .
>
> But when we talk about subcontroller action servlets for an application with multiple
> domains--
> suppose right now i am desigining an integrated application for a company which has
>ten
> different divisions and work domains, later my application can grow and i may be
>interested
> to break it in individual servers even at different locations, at that time i hope
>that if
> i have independent subcontrollers for domains i just need to detach my
>subcontroller from
> the application and promote him to controller level.
One thing I don't think I've mentioned in my own design -- unless you add some
specialized
logic to look at each request, the controller servlet itself is 100% generic, and can
be reused
across all applications. The only difference between one instance and the next is the
set of
mappings that you define in initialization parameters.
That being said, the next question is, "does your entire integrated application run in
a single
web application as defined in the servlet API?" If so, I can't see any functional
reason to
have subcontrollers -- UNLESS you really do have some specific per-request logic (done
in the
doGet/doPost method of the subcontroller) that is specific to a portion of the
application.
All of the URLs that post things need to be distinct in any case, and I generally find
it more
convenient to centralize the mapping.
If you're running in separate web applications, you're going to need to create separate
controller servlet instances anyway -- one per web application -- because the
controller
servlet (and the action classes it calls) are going to want access to the sessions for
that
particular web application.
Craig McClanahan
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets