×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

how to store and save the sessions in netscape application server

how to store and save the sessions in netscape application server

how to store and save the sessions in netscape application server

(OP)
hi friends i need to know how to save and restore the
sessions in the jsp of the netscape app server.
its not like weblogic. could u please help me out in this
as aspect

RE: how to store and save the sessions in netscape application server

Sharing session information between JSPs when
           using MMapSessionManager in iWS

Issue:20000825-2    Product:iPlanet WS  Created:08/25/2000  Version:4.1
Last Updated:08/25/2000   OS:All
                               Does this article answer your question?
                                            Please let us know!
 Problem:

           When working with session objects in Java Server Pages(JSPs), I encounter problems when I use
           MMapSessionManager .  For example, I have written the following sample JSPs:
            one.jsp

            <%@ page import="com.ivendor.ui.*" %>

            <jsp:useBean id='simpleBean' scope='session'
                class='com.ivendor.ui.SimpleBean' type='com.ivendor.ui.SimpleBean'/>
            <%
                simpleBean.setMessage("Hello World");
                response.sendRedirect("two.jsp");
            %>
---------------------------------------------------------------------------------------------------
 two.jsp

            <%@ page import="com.ivendor.ui.*" %>

            <jsp:useBean id='simpleBean' scope='session'
                class='com.ivendor.ui.SimpleBean' type='com.ivendor.ui.SimpleBean'/>

            <html>
            <BODY>
            <%
                out.println("inside two.jsp<br>");
                out.println("Value of Message:" + simpleBean.getMessage());
            %>
            </BODY>
            </html>
---------------------------------------------------------------------------------------------------
SimpleBean.java

            package com.ivendor.ui;

            import java.lang.*;
            import java.io.Serializable;

            public class SimpleBean implements Serializable
            {
             public String message;

             public SimpleBean()
             {
                    ;
             }

                public void setMessage(String str)
                {
                    message = str;
                }

                public String getMessage()
                {
                    return message;
                }
            }
---------------------------------------------------------------------------------------------------

When testing the JSPs, the output from two.jsp is as follows:

              inside two.jsp
              Value of Message:null

           The "null" value for the output on the second line indicates that the message set in one.jsp is not
           carried over to two.jsp, which is contrary to the expected behavior of the JSPs when the scope is
           set to "session."   However, the sample JSPs work properly with SimpleSessionManager.
           Workaround:

           To work around this problem, manually re-register the bean object to the session object after changing
           the bean's properties, using the following example:
            one.jsp (modified)

            <jsp:useBean id='simpleBean' scope='session' class='com.ivendor.ui.SimpleBean'
            type='com.ivendor.ui.SimpleBean'/>
            <%
                simpleBean.setMessage("Hello World");
                session.setAttribute("simpleBean",simpleBean);//re-register the bean
                response.sendRedirect("two.jsp");
            %>

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close