Hi All: I would like to know how do I pass a bean from one JSP page to another what I mean is the following, I have one jsp page called transaction.jsp and here is the code, the transaction.jsp page gets the bean from a previous jsp page, here is the code
now, what I want to do is put a link that says "printer friendly version" so people can print off this transaction.jsp page if they want, so I am thinking I just needs to add the following code to transaction.jsp
now my questions is will that actually send the actual bean object to the printer friendly page? what is the method of sending one javaBean from one JSP page to another using STRUTS, because I am thinking in my printable.jsp page, I want to use the bean tags as well, like. <bean:write name='detailsForm' property='transactionType'/> ...etc,
If you are passing beans around from JSP to JSP, and you are having your JSPs call each other directly, you are defeating the purpose of Struts and MVC. All requests should go through the Struts controller and map to Actions. Your Actions should place any necessary objects into scope for the JSPs to access. So if you want a "printer friendly version" of your data, you should link to something like /viewPrinterFriendly.do which maps to some Action which in turn places any beans you need into the proper scope, displaying the correct printer friendly view which can access those beans.
Your JSPS should never link to another JSP in your application.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: how do i pass a bean object from one JSP page to another