This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes dispatcher.forward is very slow? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "dispatcher.forward is very slow?" Watch "dispatcher.forward is very slow?" New topic

dispatcher.forward is very slow?

Rob Proesmans

Joined: Aug 16, 2012
Posts: 8

Hello programmers,

I have a JSP/servlet application running on a glassfish server with mysql database.
The problem is that my application runs too slow. I debugged for hours to find out the problem where the application slacks...

Everytime my debugpoint passes the request.dispatch from Servlet to JSP, it takes 2-3 seconds. Is this normal?
Could this be the reason that my jsp page loads 2-3 seconds after a response from a servlet?
In my servlet, I generate 4 session attributes, in total they contain approximiate 200 properties.
Are these properties maybe the reason why my dispatch loads slow?

in other words: Is the dispatch.forward the problem? Or does a heavy session attribute slacks my applications? or is the attribute only being called when i mention session.getattribute("")

Thank you everyone for reading
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60806

It's unlikely that the forward itself, or the small session footprint is causing any performance issues. How are you measuring this time? If it's by when something appears in the browser, any issue are much more likely to be in the JSP or on the browser side.

What's in the JSP?

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: dispatcher.forward is very slow?
Similar Threads
How can a non-servlet find application root and best way to access a servlets data?
Reading an ArrayList from JSP to Servlet
Database output in JSP
Session tracking (via session object) Problem
overusing session object?