File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Tomcat takes a long time to serve .jsp file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat takes a long time to serve .jsp file" Watch "Tomcat takes a long time to serve .jsp file" New topic

Tomcat takes a long time to serve .jsp file

Alan Blass
Ranch Hand

Joined: Mar 21, 2010
Posts: 146

I am running Windows Server 2008 R2 and Apache Tomcat 7.0.14 and JDK 1.6.0_25.

I have a webpage which has a javascript:

window.location = 'test.jsp';

When I activate the window.location command through a button, firefox shows:

Waiting for <ipaddress>

and the test.jsp takes about 30 seconds to load. test.jsp has absolutely nothing but a

<%@page contentType="text/html" pageEncoding="UTF-8"%>

and hello world in html.

I have tried loading a test.html page and the response is immediate. It seems that only the test.jsp is having problem.
How can I speed up the loading of test.jsp? How can I find out where the problem is?

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17247

Fire up the Windows task manager and pay attention to memory and CPU usage while you do this. It's quite possible you have insufficient RAM and your Windows machine is bogged down doing virtual memory page swaps.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: Tomcat takes a long time to serve .jsp file
jQuery in Action, 3rd edition