This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
Originally posted by Meir Yan: Hello say I like to pass object I created in one page say : MyObject obj = new MyObject("1","2","3"); via http params (supmit or post ) to other page . and use it there can it be done ?
Well, you can pass only string objects via parameters. For your custom objects and other objects, use attributes.
A request only lasts long enough to return one page. Then it's gone. When the user submits the form on that page, a new request is generated. That new request isn't going to have any of the attributes from the old one. You either need to save the information in a longer lasting scope (session or context scope) or find a way to serialize that object into a string that can be written to the page as a hidden input field.
no its ok i will use sessisons one more question when i trying to copy the the contant of the object to other object im geting error here is my code now and its working fine until i try to copy the object to object
do i need to use System.arraycopy ? is this the only way?