This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am doing a servlet project right now. On the server-side, I am trying to design a dispatchServlet which will receive the request from the user and dispatch this request to different servlets depending on some conditions.All the reponses will be handled in the latter servlets.So HttpServletResponse.sendRedirect() is not a good choice since all contents of the request will lose. Is RequestDispatcher the only choice? ( RequestDispatcher.forword()?) Any of your suggestion will be very appreciated.
My question to you is why do the "latter servlets" even have to be servlets? Why can't you make them regular Java Classes and have your dispatcher servlet create and call them directly? I have done this exact thing and in fact I am currently using it for internal web applications. The main advantage is that the developers of the "latter" classes don't need to know anything about servlets, but simply the interface with the dispatcher servlet. Also you don't have to worry about forwarding and redirecting.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com