Technically (and I haven't looked at the usebeans source to confirm) using usbeans should be faster. The reason is that unless absolutely necessary, the code should pass around a reference to the bean, not make a copy of it which would be slow. So event if you add this bean to multiple scopes, there will be only one copy. Using a series of setAttribute methods would be slower as there is a lot more code being executed.
Now having said that, I would not have thought that in the final count there would be any visible difference. Unless you are calling thousands of methods, the visible difference would be practically nothing. I would be looking at the process that is taking the 8 seconds. Is there any way you can speed this up ? Break it up into parts and time each part - where is the time being taken ? For example you might find that the database access is slow. Looking at the queries you might see some which are not using indexes, etc. Hope this helps. Regards, Derek Clarkson Global Applications Lonely Planet Publications ph: (03) 8379-8000 x8041 "It's not a bug - it's an undocumented feature!" -----Original Message----- From: Andoni [mailto:[EMAIL PROTECTED] Sent: Wednesday, 10 November 2004 10:59 PM To: Tomcat Users List Subject: Speed of <jsp:useBean> tags. Hello, I have an application which is just a front-end for a main-frame. The process on the mainframe which my application calls takes 8 seconds to complete so I am trying to make my Java application as fast as possible so that there is as little time as possible wasted. Can anybody give any tips or sites for speeding up Tomcat/Java/Webapps? Can anybody tell me if using <jsp:useBean> tags to pass an entire object to a JSP is a slow way of doing things? Am I quicker passing a list of strings using various request.setAttribute() methods? Or is this insignificant? I am really stuck because I don't know how to choose the best way of going forward. If I can't significantly improve the speed of the app. I should just abandon the project but that is not desirable as you can imagine! Andoni. ______________________________________________________________________ This email, including attachments, is intended only for the addressee and may be confidential, privileged and subject to copyright. If you have received this email in error, please advise the sender and delete it. If you are not the intended recipient of this email, you must not use, copy or disclose its content to anyone. You must not copy or communicate to others content that is confidential or subject to copyright, unless you have the consent of the content owner.