This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes how modules interact with each other? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "how modules interact with each other?" Watch "how modules interact with each other?" New topic

how modules interact with each other?

Durga Krishna

Joined: Jul 10, 2006
Posts: 11
1)How to combine two or more servlets?
2)Suppose I have developed a module in my project using servlets and jsp.And my colleques has developed thier modules.How these modules can interact with each other?
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3703

Its hard to make servlets work with each other when coded by separate developers. What you need to work on is well defined contracts between each other such as agreeing on simple POJO transfer objects and firm input/outputs of each servlet. It doesn't have to be complicated (in fact simple is better) but it has to be rock solid and clear. The clearer the contract, the easier integration will be.

Although once you go this far, you've got something that probably looks like a web/ejb service so if possible go with them since they have very well defined contracts.

Also read up on encapsulation and the blackbox methods of programming such as never allow external access to a variable (use getters/setters for all data access). This way if one of you changes your internal structure, the other is not affected.

My Blog: Down Home Country Coding with Scott Selikoff
jQuery in Action, 2nd edition
subject: how modules interact with each other?
Similar Threads
How do we maintan XML schemas in an enterpise application?
How does Axis2 interact vs Tomcat?
EJB & Servlet
User Authorisation based on Roles
More than one Struts-Config.xml File