Hi all, I would like to run over my architecture for a project with you guys: I am using the MVC pattern for this project. For the View component I will be using JSP pages, for the Controller I will use a servlet and for the Model I will use a set of utility classes. This is some of the events that will happen: 1.A JSP page calls the controller when submitted eg. Action="servlet controller" the servlet controller will get a parameter of the request object which will denote what is to be done. In one a case a call to the shopping cart class. The servlet controller creates an instance of the shopping cart class and sends the shopping cart object the data from the request object. The shopping cart object performs certain actions. When this has finished the servlet controller places the shopping cart object into the session object. 2.In another case a JSP page has been called which gets the instance of the servlet via the singleton pattern approach. The JSP page sends a request to the servlet controller with the request object asking for a certain action. The servlet controller receives the request and instantiates the appropriate class and manipulates the data. Once this has been done the servlet controller returns the manipulated data back to the JSP page while it is still loading. Two questions: ~~~~~~~~~~~~~~~~~~~~~~~~~ 1.Is this approach correct? What I am doing is submitting pages to the servlet and also getting a handle on the servlet via the singleton pattern while loading a JSP page - two different ways of calling the servlet controller. 2.Can the Singleton pattern be used on a servlet? I am unsure of how the servlet will deal with more than one request for its instance - say if two users call the same JSP page simultaneously. Thank you for reading this! I look forward to any comments Best Regards Marc ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
