Discussions

Performance and scalability: Include tags vs java beans in JSP

  1. Include tags vs java beans in JSP (1 messages)

    I hae question about performance of JSP's. Here is the situation. I have functions jsp which contains different methods to process the request. I will include functions jsp in another jsp and access the methods of functions jsp. I can achieve the same thing by using java bean. In this situation i will create functionsbean which contains all methods which are in functions jsp. I will use this java bean in another jsp using usebean tag. Which of these two options will give better performance. Consider the number of concurrent hits are about 300.

    Thanks,
    Srinivas Gamini

  2. Even ignoring performance, I can't recommend the include strategy. Java is an object-oriented language; use that to your advantage rather than working around it. Make use of an object model stored in beans, not defined functions in included JSP files.

    That said, I really can't speak to the performance angle.