Problem removing session attributes

I have a problem removing session attributes
I try w/ mysession.removeAttribute("key");
but it still lives in memory. I've tried setAttribute("key", null) as the API states that will do the same thing, but it doesn't work.
I can get mysession.invalidate() to work, but I want to keep some of the attributes there, while removing another.
I get no exceptions and no errors.
Help.
Running Tomcat 4
jre 1.3.1

Actually,
response.addHeader("Expires", "-1");should be enough.
The browser should then contact the Web server for updates to that page via a conditional If-Modified-Since request. You don't want a cache disabling 'overkill', since you'd still want the page to remain in the disk cache and used in appropriate situations without contacting the remote Web server, such as when the BACK and FORWARD buttons are pressed...
Anyway, try this first, and if it doesn't solve your problem, add the other cache-disabling headers, as outlined in the previous post.
If you're using JSP, verify also that your page has
<%@ page session="true"%>

Similar Messages

  • Accessing session attribute in output jsp page

    Hi i am not getting any output in jsp page...
    i am getting just heading
    i think some problem with Session attribute..
    if so how to access session been in jsp page
    my code is here
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%--
    The taglib directive below imports the JSTL library. If you uncomment it,
    you must also add the JSTL library to the project. The Add Library... action
    on Libraries node in Projects view can be used to add the JSTL 1.1 library.
    --%>
    <%--
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    --%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Tauvex Search Output</title>
    </head>
    <body>
    Tauvex Search Output
    <table>
    <c:forEach items="${myDataList}" var="myData">
    <tr>
    <td>${myData.Fitsfilename}</td>
    <td>${myData.RA_START}</td>
    <td>${myData.RA_END}</td>
    <td>${myData.DEC_START}</td>
    <td>${myData.DEC_END}</td>
    <td>${myData.telescope}</td>
    <td>${myData.STARTOBS}</td>
    <td>${myData.ENDOBS}</td>
    <td>${myData.FILTER}</td>
    </tr>
    </c:forEach>
    </table>
    <%--
    This example uses JSTL, uncomment the taglib directive above.
    To test, display the page like this: index.jsp?sayHello=true&name=Murphy
    --%>
    <%--
    <c:if test="${param.sayHello}">
    <!-- Let's welcome the user ${param.name} -->
    Hello ${param.name}!
    </c:if>
    --%>
    </body>
    </html>
    plz reply soon
    thanks a lot

    this is what i set in servlet
    request.setAttribute("myDataList", myDataList);
    request.getRequestDispatcher("someJspFile.jsp").forward(request, response);
    how can i access that session attribute in jsp

  • How to remove an attribute in Context when session is invalidated?

    I set a attribute in the context when i login to my application. When i logoff from my application, i remove the attribute from the context.
    But if i close my browser or encounter some error, then the session is not invalidated. The container waits till the session gets timed out and then it invalidates the session. But the attribute that i had set to the context is still there. The next time i login, i check whether the attribute is still available in context. It is.
    Scenario : Assume that i have a application and if i open some thing eg: model, then i update the attribute "read only" flag in the context as "true", so that no one can edit the model on which i am working on.
    When some other user logs in and tries to edit my model, he will get an error stating that the model is read only. Now if i log off, then i update the read only flag as false, so that some body can edit the same.
    But if i close my browser or if i encounter some error, then i am not making the read only flag as false. So even if i am not worling, still the read only flag is set to true in the context. So no one else can work on the model.
    My question is, is there a way to edit the context attribute, when i abruptly close my browser window? Is there a way to handle the dangling session objects and invalidate them immediately?

    Use the HttpSessionListener to determine when the session is destroyed and remove the attribute then. Be aware that aplication attributes are shared by all sessions and can cause problems in a multi-user environment.

  • Strange problem - session attribute

    Hi,
    This one is really strange. I have a search field on my form. When I enter a value in the field(say 'test data') and then click 'Submit', the search is performed. To retain the above search value on the screen, I put it into a session attribute and then pick it up again from there.
    The problem is, when the screen reloads after the search, only the first part of the string i.e 'test' is displayed and data disappears. Is it that when get values of session attributes in a JSP, only the value till an empty space is considered?
    I would be grateful if someone could let me know if they have ever experienced the same of if there is any documentation stating this. I am totally lost!
    Thanks in advance.

    Greetings,
    Could you please include some of your code. It seems like somewhere along the process you are either losing or not storing all the data properly.
    Thanks,
    -J

  • Problem with session.removeAttribute()

    Hi,
    After doing
    <% session.removeAttribute("USER");%>from one jsp, if i say
    <% =session.getAttribute("USER") %>in another jsp, I still get the value of the session variable USER.
    Can anybody tell what might be the problem ???
    Thanks !

    No it shouldn't and it doesn't just apply to those objects.
    Quoting the api:
    The remove attribute method:
    public void removeAttribute(java.lang.String name)
    Removes the object bound with the specified name from this session. If the session does not have an object bound with the specified name, this method does nothing.
    After this method executes, and if the object implements HttpSessionBindingListener, the container calls HttpSessionBindingListener.valueUnbound. The container then notifies any HttpSessionAttributeListeners in the web application.removeAttribute removes the attribute from session.
    If you can still see it in another jsp, you must be putting it back INTO the session somewhere.
    Cheers,
    evnafets

  • Javascript to JSP question...Can javascript function set session attributes

    hello,
    i have a web app that, on one of its pages, displays "tabbed pane" as an image map at the top (a la amazon.com). my problem is this: each "logical" page contains separate forms that all use the same javabean. in other words, imagine that the tabs represent an account maintenance web ui for an on-line record store. the first tab might be labeled "General," the second "Contact info," the third "Shipping Info." Each uses the same account bean and displays portions of its properties relevant to the tab at hand. what i want to do is allow a user to enter the account maintenance ui, update info on the first tab, click on tab two and have the request with the changes sent to a processing jsp. yet, since each "tab" is actually a separate URL to another page, how do i get the updated info on the first tabe without adding some sort of "SAVE" button on each tab. ive considered using javascript, but dont know how to get the request params out of the first tab whn i click on another tab. is it possible to include an "onClick" function in each URL that "grabs" the updated form fields off the preceeding tab? can a javacript function set session attributes in jsp?

    hello there,
    wow, you've created one big mammy-jammy tool.
    first, javascript cannot access, set values to the session, without having to post to another JSP. javascript is great for manipulating objects, layers, form values, etc.
    you have 2 issues [if i understand correctly]:
    1) you need to able to save user info for a specific tab without having to reloading the page.
    ---you can create a form for EACH of your tabs and POST all the information to a hidden IFRAME or LAYER for NN4. that hidden IFRAME / LAYER will load a JSP page which with all the parameters you posted to it. or you can build a FRAMESET and target that document["frame-name"].src with that same JSP.
    2) handling when the SAVE INFO action should happen: hence some javascript event handler: onMouseOver, onClick, etc
    ---i don't know the dynamics of your tabs, but if store which tab was clicked on last, then if the user clicks on some other tab, javascript can submit that FORM to a JSP [see condition above]
    you have an interesting tool. can i see?
    i hope i wasn't too confusing, but your problem is sooo interesting. =)
    -WJP

  • Variable coming from a session attribute

    Hello, I am developing a web application with JDeveloper 10g
    I've got a View Object which is basically a query, where I use a variable:
    WHERE BbCustomerOrderStatusTab.CUSTNO = :CustomerNumber
    When I define CustomerNumber in a form, it works:
    <af:panelForm>
    <af:inputText value="#{bindings.CustomerNumber.inputValue}"
    label="#{bindings.CustomerNumber.label}"
    required="#{bindings.CustomerNumber.mandatory}"
    columns="#{bindings.CustomerNumber.displayWidth}">
    <af:validator binding="#{bindings.CustomerNumber.validator}"/>
    </af:inputText>
    <af:commandButton actionListener="#{bindings.ExecuteWithParams.execute}"
    text="ExecuteWithParams"
    disabled="#{!bindings.ExecuteWithParams.enabled}"/>
    </af:panelForm>
    But I would like CustomerNumber to come from a session attribute. I tried something like that:
    session.setAttribute("CustomNum","IRI0001");
    setCustomerNumber(session.getAttribute("CustomNum"));
    with the View Object Editor -> Client Interface setCustomerNumber selected, but it doesn't work.
    I tried :
    String CustNum=session.getAttribute("CustomNum");
    %>
    <af:attribute name="#{bindings.CustomerNumber}"
    value="<%= CustNum%>"/>
    but it tells me that "Attribute value does not accept runtime expressions".
    Does someone know how I could do that?
    Thanks,
    Romain

    Hi,
    Frank's suggestion should work.
    Most importantly, don't forget to declare your bind variable in your view object !!
    Your statement looks odd to me
    String CustNum=session.getAttribute("CustomNum");
    %>
    <af:attribute name="#{bindings.CustomerNumber}"
    value="<%= CustNum%>"/>
    There are many ways to do it. You may try using backing bean for command button's actionlistener or action like the following
    class myBackingBean
    private String CustNum; //of course with getter and setter method
    myButtonAction() {
    CustNum = yourFavouriteValue;
    OperationBinding ob = getBindings().getOperationBinding("ExecuteWithParams"};
    ob.execute();
    note you must declare CustomValue in your pageDef's binding to #{yourBackBeanClass.CustNum} in your ExecuteWithParams binding
    I don't know and seems not being recommended to set session value in jspx.
    Another way is inside your command button in the jspx
    <af:setActionListener from="#{somesource.value}"
    to="#{processScope.CustNum}"/>
    in such case, you must declare CustomValue in your pageDef's binding to #{processScope.CustNum} in your ExecuteWithParams binding
    If you have already set session value somewhere beforehand, then what you need to do is simply declare CustomValue in your pageDef's binding to #{sessionScope.CustNum} in your ExecuteWithParams binding.
    I did lot of ExecuteWithParams thing and no problems occur so far.

  • Order Version problem in session

    Following error is getting displayed while udpating the order:
    Saving order 804880053 failed because doing so would result in data being overwritten. Order data for your browser window was out of date. Please re-submit your changes for them to take effect.
    My order is getting update in CSC and after that again I'm updating my order in StoreSite, in that perticular scenario only this error is coming.
    I have also used below code before updating the order in store site:
    itemDesImpl = (ItemDescriptorImpl)rep.getItemDescriptor("order");
    itemDesImpl.removeItemFromCache(orderId);
    and
    oImpl.invalidateOrder();
    but It only removes cache data not session data and I think the problem is due to session data of order. If I would be able to remove order from session also, I guess I'm done with that error.
    As per my understanding below places order data exists:
    1. Session
    2. Cache
    3. Database
    Please help me out!

    Hai,
    I'm using VS2010 and SQL Server 2005.
    I have a problem in Session state.
    See below is my code,
    //View.aspx.cs
    //Here I assign a textbox value to session
    protected void btnEdit_Click(object sender, EventArgs e)
            Session["rollno"] = txtRollNo.Text;
                Response.Redirect("Edit.aspx");
    //Edit.aspx.cs
    //Here I assign a session value to textbox, which is stored in last page.
    protected void Page_Load(object sender, EventArgs e)
            txtRollNo.Enabled = false;
            txtRollNo.Text = Session["rollno"].ToString();
            getdata();
    public void getdata()
            SqlConnection con = new SqlConnection("Data Source=SERVICETEAM-PC;Initial Catalog=csc;User ID=sa;Password=kavi");
            con.Open();
            SqlCommand cmd = new SqlCommand("Select * from Csc where Roll_No='" + txtRollNo.Text + "'", con);
            SqlDataReader dr = cmd.ExecuteReader();
            if (dr.Read())
                txtName.Text = dr.GetString(1).ToString();
                txtAddress.Text = dr.GetString(2).ToString();
                txtMobileNo.Text = dr.GetString(3).ToString();
                txtYesNo.Text = dr.GetString(4).ToString();
    From the above code If I the Edit button, It will show an error like 
           

  • Setting session attributes at the Role level

    I am running AM7.1 in Legacy mode and I am trying to create a role and assign session attributes at this role level. I followed the instructions for doing this but it does not seem to be working. I created the role and added the session service to it. I then went in an changed the attributes (Max Idle, Max Session, etc.) to the values I need for the role. I then assigned the role to a user. However when I log in as this user and look at the Active Sessions panel all of the values are still saying they are set at the defaults. It is not picking up the new values for the user. Am I missing something? Help! -Jeff

    Reply i was also getting this problem in relam mode but 7.0..........but when i specify in the url?role=rolename..........i see the session info applied but i wanted it to be dyanmically applied(without specifiying the role in the url).......i have raised an SR but that is for 7.0 .........please do it for 7.1 i think you might get some response.

  • Session Attribute

    Hi,
    We have some problems with our portlet (deployed on portal 10g). We have two “applications”. One is outputting a menu with links to the other JSP that is redirecting the user.
    In the first application we set a session variable that needs to be read in the other JSP. But the redirecting script can’t read the session variable (session.getAttribute always returns null).
    And the funny thing is, we have an old version of these two scripts that are deployed and running on the same portal in the same OC4J (under different name) and they work properly.
    We checked all the settings we could think off, but we didn’t find anything.
    Regards,
    Gregor

    Hello Gregor,
    Here i have few quick thought that hit my mind..
    I am assuming you are developing JPDK portlet, right ?
    Just check out two settings,
    First:-
    While registering the provider, on the General Properties page we first write the web provider URL. Then on the same page, under User/Session Information section, make sure that Login Frequency must be selected as Always and Required Portal user specific session information must be checked.
    Click on Apply and OK.
    Second:-
    In the provider.xml the session attribute must be set to true.
    If you have already done the above steps, and still facing issues.
    please let me know, we will find some solution.
    Thanks
    <Neeraj Sidhaye/>
    Try_Catch_Finally AT YAHOO DOT COM
    http://ExtremePortal.blog.co.uk

  • Session attributes persists forever!

    When I validate form input in my servlet, I create a HashMap of error
    messages and store that Hash in the session
    (session.setAttribute("myErrors", hash))
    Then, I response.sendRedirect() the user back to the page and print
    the error messages with (session.getAttribute("myErrors")). After
    this, I try to clear the session attribute with:
    session.removeAttribute("myErrors"), but it still remains in the
    session!
    I even try to add a "new HashMap()" to the "myErrors" attribute after
    I remove it, but that doesn't work.
    Any ideas on why I'm unable to clear the attribute from my session?

    I found out that the session has changed. I am using Tomcat. This probably explain why the attribute is not there.
    When I use the back button, I get back to the earler session with all the attribute intact. Why does this happen???.
    JSP code below
    <BR>Session ID: <%= session %></BR>
    <%
         Enumeration ee;     
         ee = session.getAttributeNames();
         System.out.println("[START LIST]SESSION ATTRIBUTES........");
         while (ee.hasMoreElements()) {
              String s = (String)ee.nextElement();
    %>
    <BR><%=s %></BR>
    <%
         System.out.println("[END LIST] SESSION ATTRIBUTES........");
    %>

  • Error in retrieving session attribute for ejb remote in clustered env

              We store EJB remote object in session and differnt clients retrieve it from sessionbefore
              making a business method call. This seems to work in most cases but sometimes
              it gives the exception attached. This happens only in a clustered environment.What
              has been observed is that if we put the remote object inside a hashtablewhich
              in-turn is stored in session retrieval from hashtable does not give thisproblem.
              Any suggestion / solution would be greatly appreciated.
              Regards,
              Shilpa
              The exception Stack trace is attachedjava.rmi.NoSuchObjectException: Unable to
              locate EJBHome: 'BalconHome' on server:'t3://176.19.183.6,176.19.183.15:9616 at
              weblogic.ejb20.internal.HomeHandleImpl.getEJBHome(HomeHandleImpl.java:80) at weblogic.ejb20.internal.HandleImpl.getEJBObject(HandleImpl.java:184)
              at weblogic.servlet.internal.session.SessionData.getAttribute(SessionData.java:395)
              at com.chase.ccs.util.AccountInfoAccessor.setCurrentAccountAttributeBalcon(AccountInfoAccessor.java:362)
              at com.chase.ccs.util.ModelAccessor.initBlaconOfferModel(ModelAccessor.java:311)
              at com.chase.ccs.balancetransfer.OfferPortlet.service(OfferPortlet.java:88) at
              com.chase.ccs.balancetransfer.OfferView.pageStart(OfferView.java:65) at com.chase.ccs.util.ModuleStarter.doAllPageStart(ModuleStarter.java:236)
              at jsp_servlet._templates._template0005._UXaQVaXTUaSYaWaSRZfdXbWSfYXbTRQb.__ccs_mm_tgl_pfp_grid._jspService(__ccs_mm_tgl_pfp_grid.java:316)
              at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
              at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:482)
              at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:308)
              at weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:116) at com.epicentric.servlets.ServletUtils.include(ServletUtils.java:150)
              at com.epicentric.template.Style.execute(Style.java:538) at com.epicentric.taglib.html.IncludeGridTag.doStartTag(IncludeGridTag.java:57)
              at jsp_servlet.__index._jspService(__index.java:560) at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
              at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:242)
              at com.epicentric.servlets.stackable.SiteDispatcherServlet.service(SiteDispatcherServlet.java:195)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
              at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2546)
              at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2260)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              

              The EJB is stateful session EJB. Have seen some posts pointing to problems
              with
              stateful session EJB and cluster and the suggested solution was SP4 (we are
              on 6.1 SP3).
              Hope this gets more clarity (and some solutions!!!).
              regards,
              Rajesh / Shilpa
              "Cameron Purdy" <[email protected]> wrote in message
              news:[email protected]...
              > It's probably caused by the fact that the session attributes get
              serialized
              > when they are in a cluster. (Something to do with ser/deser process?)
              >
              > Peace,
              >
              > Cameron Purdy
              > Tangosol, Inc.
              > http://www.tangosol.com/coherence.jsp
              > Tangosol Coherence: Clustered Replicated Cache for Weblogic
              >
              >
              > "Shilpa" <[email protected]> wrote in message
              > news:[email protected]...
              > >
              > > We store EJB remote object in session and differnt clients retrieve it
              > from sessionbefore
              > > making a business method call. This seems to work in most cases but
              > sometimes
              > > it gives the exception attached. This happens only in a clustered
              > environment.What
              > > has been observed is that if we put the remote object inside a
              > hashtablewhich
              > > in-turn is stored in session retrieval from hashtable does not give
              > thisproblem.
              > > Any suggestion / solution would be greatly appreciated.
              > >
              > > Regards,
              > > Shilpa
              > >
              > > The exception Stack trace is attachedjava.rmi.NoSuchObjectException:
              > Unable to
              > > locate EJBHome: 'BalconHome' on
              > server:'t3://176.19.183.6,176.19.183.15:9616 at
              > >
              weblogic.ejb20.internal.HomeHandleImpl.getEJBHome(HomeHandleImpl.java:80)
              > at weblogic.ejb20.internal.HandleImpl.getEJBObject(HandleImpl.java:184)
              > > at
              >
              weblogic.servlet.internal.session.SessionData.getAttribute(SessionData.java:
              > 395)
              > > at
              >
              com.chase.ccs.util.AccountInfoAccessor.setCurrentAccountAttributeBalcon(Acco
              > untInfoAccessor.java:362)
              > > at
              >
              com.chase.ccs.util.ModelAccessor.initBlaconOfferModel(ModelAccessor.java:311
              > )
              > > at
              > com.chase.ccs.balancetransfer.OfferPortlet.service(OfferPortlet.java:88)
              at
              > > com.chase.ccs.balancetransfer.OfferView.pageStart(OfferView.java:65) at
              > com.chase.ccs.util.ModuleStarter.doAllPageStart(ModuleStarter.java:236)
              > > at
              >
              jsp_servlet._templates._template0005._UXaQVaXTUaSYaWaSRZfdXbWSfYXbTRQb.__ccs
              > mmtgl_pfp_grid._jspService(__ccs_mm_tgl_pfp_grid.java:316)
              > > at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at
              >
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              > :265)
              > > at
              >
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              > :200)
              > > at
              >
              weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImp
              > l.java:482)
              > > at
              >
              weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImp
              > l.java:308)
              > > at
              weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:116)
              > at com.epicentric.servlets.ServletUtils.include(ServletUtils.java:150)
              > > at com.epicentric.template.Style.execute(Style.java:538) at
              >
              com.epicentric.taglib.html.IncludeGridTag.doStartTag(IncludeGridTag.java:57)
              > > at jsp_servlet.__index._jspService(__index.java:560) at
              > weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
              > > at
              >
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              > :265)
              > > at
              >
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              > :200)
              > > at
              >
              weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImp
              > l.java:242)
              > > at
              >
              com.epicentric.servlets.stackable.SiteDispatcherServlet.service(SiteDispatch
              > erServlet.java:195)
              > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
              >
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              > :265)
              > > at
              >
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              > :200)
              > > at
              >
              weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
              > ntext.java:2546)
              > > at
              >
              weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
              > :2260)
              > > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139) at
              > weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              >
              >
              

  • Fetch a session attribute without transfer it as parameter

    Hellow everyone, now I meet a greate problem:
    I put a session attribute with a code (as identifier) in HttpServletRequest,
    but do not know if there is any way to fetch it from request object in a none servlet/jsp class
    without transfer the HttpServletRequest object? for example, should I use some context object fetch it
    directly from context rather than from request object.

    Hi!
    If you want to fetch the session object without transfering the parameters, then you can try with the getAttributeNames() method of the HttpSession Interface.
    Try it out!
    If u face any problem mail me, here itself or else to my mail id : [email protected]
    Regards,
    dinesh

  • URGET!!! Get Session Attribute On Form

    Hi alls,
    I develope application with Forms 9i and JSP.My Application Program is developed by Forms 9i but Menu,that call application program,is developed by JSP.I knew that if I want to call a Form from JSP,I have to append &otherparams on URL.
    My Problems is :
    1.I want to get some parameters,is seted to session attribute in JSP,from Menu to Forms and don't let the users to see these parameters on URL. HOW CAN I DO? (URGENT!!!!)
    2.If I want the Menu always display on top and application display on botton of browser. HOW CAN I DO?
    Thank you for advance.
    PS. Menu develop in dropdown style,it will expand(drop) when move mouse on it.

    Hi,
    1.I want to get some parameters,is seted to session attribute in JSP,from Menu to Forms and don't let the users to see these parameters on URL. HOW CAN I DO? (URGENT!!!!)
    You can't get session attribute from Forms because it runs as an Applet in the browser and does not have access to the server side request object.
    You can access request parameters that are used to call Forms, but that's it.
    2.If I want the Menu always display on top and application display on botton of browser. HOW CAN I DO?
    Use HTML frames
    Frank

  • Error-Cannot serialize session attribute

    i don't know why that is happening...
    org.apache.catalina.session.StandardSession writeObject
    WARNUNG: Cannot serialize session attribute SessionBean1 for session FE3C10ABDF8FDE020A4A4879560D980B
    java.io.NotSerializableException: oracle.jdbc.driver.T4CConnection
            at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
            at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
            at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
            at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
            at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
            at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
            at org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1462)
            at org.apache.catalina.session.StandardSession.writeObjectData(StandardSession.java:938)
            at org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:516)
            at org.apache.catalina.session.StandardManager.unload(StandardManager.java:462)
            at org.apache.catalina.session.StandardManager.stop(StandardManager.java:666)
            at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4345)
            at org.apache.catalina.manager.ManagerServlet.stop(ManagerServlet.java:1226)
            at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:370)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
            at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:174)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
            at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
            at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
            at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
            at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
            at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
            at java.lang.Thread.run(Thread.java:619)

    Someone else had this same problem and they seem to have solved it:
    http://forum.java.sun.com/thread.jspa?threadID=5105589&messageID=9363332
    I guess SessionBean1 is not serializable perhaps because it doesn't implement Serializable, and the writeObject method in StandardSession is trying to write it to disk (trying to serialize it).
    Try changing SessionBean 1 to
    public class SessionBean1 implements Serializable{
    }

Maybe you are looking for