How to pass an Object from one JSP to other JSP?

Viewed 6274

I have two jsp files, jsp1 and jsp2. When an edit button clicked on jsp1 will call a java script function . From javascript function i am calling jsp2. I used window.open beacuse i need this jsp2 as opens as a popup.Now i want to pass an object from jsp1 to jsp2 when i click edit button.How can i do that?.

    This is my code

    jsp1

    < script language="JavaScript">

            function edit(){

                    window.open("jsp2.jsp",'popuppage',"height=600,width=800,status=yes,toolbar=no,menubar=no,location=no");
                    return true;

                }
    < /script>

     < stripes:form name="upload"
                        action="/upload.action" enctype="multipart/form-data">
          < table>

         <% List<TableDto> list = (List<TableDto>)request.getAttribute("table"); %>

                            <%
                                if(list != null){
                                 for (TableDto dto : list) { 
                            %>
                      < tr>
                                <td><%=dto.getName()%></td>
                                <td><img src="<%=dto.getPath() %>" width="40px"
                                    height="40px" /></td>
                                <td><%=dto.getText()%></td>
                                <td>


                                <input type="image" name="edit"onclick="edit()"
                                    src="${globalPath}/images/edit_pen.jpg">

                    < /tr>

                            <%
                                } 
                                }
                            %>

          </table>
    < /stripes:form>
5 Answers
Related