hi, i have a controller servlet but it seems to get too messy as my project is rather huge. Is there a way to simplify my controller servlet, say like creating another controller from the main controller servlet, OR there are better ways? Thanks~
Are you using a front-controller pattern? You seem to be having a separate servlet for each type of request? You can try and use composition (preferred) or inheritance to separate out reusable comon logic.
Hi Derek Bright, Can you add more details about your problem?
- Krishna<br /> SCJP 1.4 SCWCD 5
Joined: Aug 28, 2008
hmm... i try to summarize
under my web.war i have a servlet controller which directs the request to the respective jsp. To make things less complicated in the controller, i have create separate java class (act as managers) to communicate with the session beans. The controller would only need to call the java class manager. However, i still find the codes in controller rather long. So how can i solve this?
overview: controller -> manager -> session beans then controller dispatches the necessary jsp file.