Discussions

General J2EE: strenge problem

  1. strenge problem (2 messages)

    I hava a screen on web,there is an iframe,the content displayed in frame is depands on the parameter pass
    for ex.,:
    form.action="thepage.jsp?para=A"
    then the iframe display contentA
    if form.action="thepage.jsp?para=B"
    then the iframe display contentB

    what's stenge is:
    userA from pcA access the server and do
    form.action="thepage.jsp?para=A"
    the userB from pcB do:
    if form.action="thepage.jsp?para=B"
    at the same time,the contentB display on both pc
    why? what's the solution?
    I'm using JBoss 3.2.3

    Threaded Messages (2)

  2. strenge problem[ Go to top ]

    I figured out something.
    my code in jsp like

    String name=request.getParameter("para");
    out.println("name1="+name);
    pe.doSomething(name);
  3. strenge problem[ Go to top ]

    I figured out something.
    my code in jsp like

    String name=request.getParameter("para");
    out.println("name1="+name);
    pe.doSomething(name); //call a stateless ejb method.in this method,only use never change the name
    out.println("name2="+name);

    when 2 user come in at same time, use
    form.action="thepage.jsp?para=A"
    the userB from pcB do:
    form.action="thepage.jsp?para=B"

    some times,it print name1=A name2=B

    I put
    <%@ page isThreadSafe ="false"%>
    it doesn't happen.
    so,how can I find out why my code is not thread safe?