This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
There are 2 methods for passing parameter among various JSP's. First is by use of hidden input type in the forms. Second one is use of beans(setter and getter methods) The problem with beans is these values expires after certain time.. I want to know which method is better....
Varun I assume you are talking about passing parameters from one jsp to another, correct? Yes, you can it with values on a form (either hidden or visible) and with a bean (assuming it is scoped as anything other than page). Also, dont forget about the Session and application objects too!! They can be real handy for passing info that you might not neccesarily need to manipulat with a bean but want to have on hand to use. A good one would be the persons name so you could personalize each page, or an id retrieved from a DB, so you dont have to get it each time you need it. As far as which way is better than any other way it would all depend on what it is you need the piece of data to do, where you get the initial value from (user, DB, calculated), and how long you need it to be around. Hope that helps a little bit
if the jsp'd are in the same context Use the application object(ServletContext) to store the values as name/value pairs and can access it across any no of jsp in the application. I agree that it depends on wat u wanna do!
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