It seems that you need to _cache_ the creation of the vector object.
So that you don't have to keep requesting the same overhead all the time.

You can cache very easy with java.util.Hashtable. The first time you create
company_vector you store it inside the hashtable by name "acme_compvec"
so that you can retrieve by the same name when the next server request
comes in. You test easily too by trying to retireve the named object from the
hashtable.

I am asumming that company vector is constant and does n't change overlife
of your webapps!!!
--
Peter Pilgrim
G.O.A.T
                    "the Greatest Of All Time"



---------------------------------------- Message History 
----------------------------------------


From: julian sitkewich <[EMAIL PROTECTED]>@java.sun.com> on 18/01/2001 19:58

Please respond to [EMAIL PROTECTED]

DELEGATED - Sent by:     A mailing list about Java Server Pages specification and 
[EMAIL PROTECTED]>


To:   [EMAIL PROTECTED]
cc:
Subject:  MVC Architecture and JSP


I pose a question, in the MVC (Model-View-Controller) architecture
information is commonly passed between servlet and JSP via session. This
seems to go against certain principles of server overhead and memory
consumption. My example is this: A servlet creates a HUGE Vector object of a
company department directory list. The request is forwarded to the JSP to
list the contents of the Vector. Is there a better way than to store my
large Vector in the user Session??

Regards,

Julian
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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



--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorised copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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

Reply via email to