Andres Portillo wrote:
> Hi:
>
> I have the funny work of migrating an standalone application made in
> Swing to a client (HTML) - server (Servlet) aproach. My problem is that
> the current application at the start creates several objects and
> register them in a RMI server; the question is how can I save the state
> of this objects, so when an user access for first time the servlet it
> creates the objects and then the user can access these objects without
> registering again when he access the servlet.
>
> I have already take a look at the ways that the servlet's API allow
> to store aplication data (cookies, url encoding), but I was wondering if
> they are apropiated or there is a better way to do it. I would
> apreciate any advice.
>
> Thanx in advance
I will try not to laugh (:)). You may want to use ServletContext in this case
like:
ServletConfig sc = getServletConfig();
ServletContext sct = sc.getServletContext();
sct.setAttribute("rmiobject1",rmiobject1);
RMIObject1 rmiobject1 = sct.getAttribute("rmiobject1");
Gabriel Wong
http://www.ezwebtools.com
----------------------------
___________________________________________________________________________
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