Discussions

General J2EE: How to improve the performance of JSP page?

  1. How to improve the performance of JSP page? (5 messages)

    I have a JSP page which queries the database the displays the result.I have to improve the performance of JSP page so that the response time is minimal. I have the db queries in PreparedStatement. Other than tuning in the SQL queries, how can I improve the performance?
    The loading of JSP page takes time.

    Threaded Messages (5)

  2. You can improve perceived performance by pre-compiling your JSP. Most servers have some sort of utility for doing this, or you can specify that the JSP will load on startup in the web.xml configuration file.

    Some other tricks:

    1. Don't uses strings to assemble data. Print data directly to the output stream using out.print() or <%= %> statements.

    2. Be careful about custom tags. Some tags are optimized, but others are very ineffecient. While custom tags can help make JSP more maintenable, the tradeoff is in performance.
  3. How to improve the performance of JSP page?[ Go to top ]

    Would which tags are inefficient?

  4. I have a JSP page which queries the database the displays the result.I have to improve the performance of JSP page so that the response time is minimal. I have the db queries in PreparedStatement. Other than tuning in the SQL queries, how can I improve the performance?


    When are you establishing your Connection? Are you using PooledConnections? You might consider using a servlet/JSP architecture, where the servlet makes the connection when the session is first opened, and uses that connection over and over, although this has other performance considerations based on number of simultaneous users.
  5. Distributed caching[ Go to top ]

    You need to cache your data. Distributed caching is your solution. Only caching can improve response time and enhance app performance.  Caching is basically used to enhance performance in terms of response time as well. I’d rather suggest you NCache (an-in memory distributed cache). Further read this articles it will surly help http://www.alachisoft.com/ncache/improve-javaserverpages-performance.html"> Improve JSP Performance with caching

  6. Improving the JSP[ Go to top ]

    When the user requests a JSP page for the first time, A JSP converts into servlet java source file and compiles into servlet class file that is called as translation phase, then onwards it works like pure servlet for all requests this is called execution/request process phase. But the method signatures are different