Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_jsp thread: Problem in jsp passinf values in a form


Message #1 by "Preeti" <preetisikri@h...> on Tue, 6 Mar 2001 12:18:24 -0500
Have you tried to use session objects? If not, you can define a sessionj
object of type Vector, and define it in both two pages. In this way, you
can share the contents between several pages. Write this line at the
beginning of your JSP:

     <jsp:useBean id = "VectorSession1"      class = "java.util.Vector"
scope = "session" />

But be careful, the first time I tried it I could see that if you assign
directly a reference to another Vector you can lose the value in the
session. That is to say, instead of this line:

     VectorSession1=AnotherVector2;

Code these ones:

     VectorSession1.clear();
     VectorSession1.addElement(AnotherVector2.elementAt(0));
     .......................
     VectorSession1.addElement(AnotherVector2.elementAt(n));



  Return to Index