Why is my jsp takes so long to load?

I have just installed Tomcat 4.1.24 and started to play around with JSP for the first time. My questions are
1) why is a simple page like the one shown below take nearly half a minute to display (either for the first time or by pressing the reload button on the browser)
2) would it go any faster with a servlet?
;o)
V.V.
<HTML>
<HEAD><TITLE>AOKabc demo</TITLE></HEAD>
<BODY bgcolor="#FBFAE0">
<A HREF="http://java.sun.com/getjava/index.html"><IMG SRC="getjava.gif"></A><BR>
<BR>
<A HREF="./help/aokabc.png" TARGET="Contents"><B>AOKabc Screenshot</B></A><BR>
<BR>
<B>Run signed applet:</B><BR>
<%
   Integer[] count=new Integer[8];
   synchronized (application) {
      for (int i=0;i<count.length;i++) {
         count=(Integer)application.getAttribute("counter"+i);
if (count[i]==null) count[i]=new Integer(0);
%>
JRE 1.4.0.0
<% out.println(" ("+count[1]+")<BR>"); %>
JRE 1.4.1.0
<% out.println(" ("+count[2]+")<BR>"); %>
JRE 1.4.1.1
<% out.println(" ("+count[3]+")<BR>"); %>
JRE 1.4.1.2
<% out.println(" ("+count[4]+")<BR>"); %>
<BR>
<IMG SRC="webstart_small.jpg">
<% out.println(" ("+count[5]+")<BR>"); %>
<BR>
<B>Download:</B><BR>
executable jar<B>AOKabc</B> executable jar
<% out.println(" ("+count[6]+")<BR>"); %>
Zipped help & demo files
<% out.println(" ("+count[7]+")<BR>"); %>
<BR>
<B>Feedback</B><BR>
<BR>
<table cellspacing=0 bgcolor=#cfcfcf>
<tr>
<%
count[0]=new Integer(count[0].intValue()+1);
application.setAttribute("counter0",count[0]);
String counter=""+count[0];
while (counter.length()<5) counter="0"+counter;
for (int i=0;i<counter.length();i++) {
out.println("<td><img src='./thumb/d"+counter.charAt(i)+".gif'></td>");
%>
</tr>
</table>
<small>since 3/27/2003:</small>
<BR>
</BODY>
</HTML>

I have removed all but one count for the page and the loading speed is now within a tolerable limit. JSP doesn't work very well does it? Here is the final version of the page at http://www.aokabc.com :
<HTML>
<HEAD><TITLE>AOKabc demo</TITLE></HEAD>
<BODY bgcolor="#FBFAE0">
<A HREF="http://java.sun.com/getjava/index.html"><IMG SRC="getjava.gif"></A><BR>
<BR>
<A HREF="./help/aokabc.png" TARGET="Contents"><B>AOKabc Screenshot</B></A><BR>
<BR>
<B>Run signed applet:</B><BR>
<%
   Integer count;
   synchronized (application) {
      count=(Integer)application.getAttribute("counter0");
%>
<A HREF="AOKabc140_0.jsp" TARGET="Contents">JRE 1.4.0.0</A><BR>
<A HREF="AOKabc141_0.jsp" TARGET="Contents">JRE 1.4.1.0</A><BR>
<A HREF="AOKabc141_1.jsp" TARGET="Contents">JRE 1.4.1.1</A><BR>
<A HREF="AOKabc141_2.jsp" TARGET="Contents">JRE 1.4.1.2</A><BR>
<BR>
<A HREF="WebStart.jsp" TARGET="Contents"><IMG SRC="webstart_small.jpg"></A><BR>
<BR>
<B>Download:</B><BR>
<A HREF="JarDownload.jsp" TARGET="Contents"><B>AOKabc</B> executable jar</A><BR>
<A HREF="ZipDownload.jsp" TARGET="Contents">Zipped help & demo files</A><BR>
<BR>
<A HREF="feedback.html" TARGET="Contents"><B>Feedback</B></A><BR>
<BR>
<table cellspacing=0 bgcolor=#cfcfcf>
<tr>
<%
   count=new Integer(count.intValue()+1);
   application.setAttribute("counter0",count);
   String counter=""+count;
   while (counter.length()<5) counter="0"+counter;
   for (int i=0;i<counter.length();i++) { %>
      <td><img src="./thumb/d<%=counter.charAt(i)%>.gif"></td>
   <% }
%>
</tr>
</table>
<small>since 3/27/2003:</small>
<BR>
</BODY>
</HTML>Thank you all...
;o)
V.V.

Similar Messages

  • Why does mac mail take so long to load with icloud

    whenever I reopen mail it takes an extremely long time to load, since I switched ovet to icloud.  I have tried to delete some extra mailboxes, didn't seem to help at all.  any suggestions?

    Try setting:
    Mail > Preferences > General > Check for New Mail > [enter a good frequency]

  • Why does migration assistant take so long to load?

    I'm trying to set up a new Mac mini with info from old Mac mini. How long am I supposed to wait for this to work? I've tried 5 times via wireless and Ethernet. It spends 30 plus minutes gathering info. How long should it take? What is the best way to do this? (I'm not buying a FireWire cable that connects old style and new)

    Your best bet is to use +Setup Assistant+ when your new Mac first starts up. See [Setting up a new Mac from an old one or its backups|http://web.me.com/pondini/AppleTips/Setup.html] (or use the link in *User Tips* at the top of this forum). If you've already set up a user account on the new Mac, see the "Second Chance" instructions in the green box.
    It will be much faster and more reliable via FireWire.
    Ethernet will take longer, but don't try wireless; it's notoriously slow and unreliable.

  • Why does it take so long to load a web page on my iPad

    Why does it take so long to load a web page on my new ipad wifi

    This is probably not a problem with the iPad, but with the wi-fi. If your internet connection and/or wi-fi speeds are slow, then loading web pages will be slow. If I was you, I would research different kinds of wireless routers to find the fastest one in your price range, and also research different kinds of modems.

  • After updating my iphone 4 to IOS7, why do my apps take so long to open?

    After updating my iphone 4 to IOS7, why do my apps take so long to open?
    Also, the page flips within the app are much slower?
    Why?

    Why don't you try updating to 5.0 since it's available now?

  • Why download AE cs6 take so long time

    Why download AE cs6 take so long time

    The file size is quite large.  Also the download speed is dependent on how many other users are downloading and the speed of your Internet connection.

  • Why do Mail's inbox messages take so long to load?

    Why do Mail's inbox messages take so long to load?

    Back up all data.
    Triple-click the line below to select it:
    ~/Library/Containers/com.apple.mail/Data/Library/Caches/com.apple.mail/Cache.db
    Right-click or control-click the highlighted line and select
    Services ▹ Reveal
    from the contextual menu.* A folder should open with an item selected. Quit the application if it's running. Move the selected item to the Trash. Relaunch the application and test.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard (command-C). In the Finder, select
    Go ▹ Go to Folder...
    from the menu bar, paste into the box that opens (command-V). You won't see what you pasted because a line break is included. Press return.

  • Why does iPhone videos take so long to come up on the Apple TV?

    Why does iphone videos take so long to come up on the apple tv?
    1080P has a large file size but are there ways to get it to start to play faster?
    Hard wiring it into the LAN helped a bit but what is really slowing it down? WPA2?
    Thanks,

    could be the wifi speed as in 56Mbit vs. newer 300Mbit version
    or interfearing from other wifi networks which use the same channel
    or microwave or dect phones which also operate on the 2.4Ghz band

  • Why does it take so long to load a tv show?

    why does it take so long to load a tv show or movie when i am connected to a wifi other than my home?

    Very probably because many devices are sharing the same Internet pipe and you're getting only a portion of the total capacity.
    I suggest that you obtain the free "SpeedTest" app and compare data rates at home and elsewhere.

  • Widgets take sooo long to load?

    My widgets take so long to load even after I have obtained an internet connection. Does anyone happen to know why this is?
    Any suggestions would be great. They sure do take quite a while to show the information?
    Dorian

    There are several ways to improve performance, but the best advice I can give is to avoid reports which result in large datasets. Start with small reports on aggregated level of detail and drill down or navigate to reports with higher level of detail. Apart from this, there are also technical approache to improve performance like using aggregate tables or seeding the cache with the reports. Think also about your database (indexes).

  • HT4352 apple tv takes too long to load photos

    I am running iTunes (11.1.5.5) on Windows 7 and have setup home sharing and accessing the Photo Library from Apple TV 3rd Generation.
    We have a lots of photos (approx 21000) organizaed in folders, eg:
    Main Photo Folder
    Folder 1 (5500 photos)
    F1-Sub 1
    F1-Sub 2
    F1-Sub 3
    Folder 2 (3500 photos)
    F1-Sub 1
    F1-Sub 2
    F1-Sub 3
    Folder 3 (12000 photos)
    F1-Sub 1
    F1-Sub 2
    F1-Sub 3
    Apple TV doesn't show the sub-folders beyond the first set of folders and as a result it takes too long to load our list of photos, is there anything that can be done to fix this?
    Thanks!

    I am having exactly the same issue. Moved house and now starting a movie takes minutes, not seconds... I've got both the Mac and ATV connected via ethernet to my Airport Extreme base station, but have no explanation for this bizarre slowdown. I also don't have internet currently, but I can't understand with content not purchased on iTunes, why that would make any difference...?

  • [SOLVED] initramfs takes too long to load

    Using systemd-analyze I found out that initramfs takes too long to load:
    463ms (kernel) + 11875ms (initramfs) + 6014ms (userspace) = 18353ms
    My HOOKS array in mkinitcpio.conf is the following:
    HOOKS="base udev autodetect modconf block encrypt lvm2 filesystems usbinput fsck"
    I suspect that the long loading time of initramfs is caused by partitions decryption (I am using dm-crypt / LUKS on top of LVM).
    Is there any tool that can report loading times of HOOKS seperately, just like systemd-analyze plot does for userspace?
    Last edited by nasosnik (2013-01-21 14:45:28)

    cfr wrote:
    In what sense is it "too long"?
    I'm just wondering: suppose that you find out that it is because you are using encryption. Would you then switch to a non-encrypted system? Would you make better use of the extra seconds you might save on those rare occasions when you reboot? Even if you reboot twice a day, you might save what? Suppose you would even save 5s per boot. That will give you a whole extra 1 minute and 10 seconds a week. Assuming you don't multitask. Obviously if you multitask, the gain will be less. Would that make it worth risking the security of your data?
    EDIT: I didn't mean this to sound as confrontational as it does now I read it back. It just always puzzles me that people are so concerned about shaving a few milliseconds here and there. I always hope that they put the time they save to good use but then I realise that the time they spent shaving the milliseconds off will obviously outstrip the time saved.
    I really don't care about the boot time because of the reasons you have already mentioned. I just want to figure out if there is any misconfiguration. I am just investigating why initramfs takes significant longer to load compared with my desktop Arch installation (non-encrypted) 1316ms for initramfs. My desktop has a Pentium 4 CPU and laptop has a quad-core i7.
    roentgen wrote:11875ms (initramfs)  means the time it takes you to type the password.
    systemd-analyze is not counting the time is spent to type the password.

  • Takes too long to load a ses file

    Why does it take so long to load a *.ses file? To me it seems that it takes waaaaaaaaaay too long.

    It just now took 3 minutes 55 seconds to load a 1.40 MB ses file. All files probably total 5-600 MBs. A whole lot of effects. I have an AMD Athlon 4200 64 X2 Dual Core. 4 GB ram.
    Waaaaaay too long. I hate to close the ses file when I'm through for the day cause I have to load it back in.
    I have pk files turned off. I guess I'll have to turn them back on. I hate all those little files cluttering up my drive. I guess it's a trade off, though. Damned if you do, damned if you don't. Thanks for the replies.

  • MS Outlook 2007 takes very long to load after iTunes update

    After updating iTunes - MS Outlook 2007 takes forever to load. If I uninstall iTunes problem fixed. Reinstall iTunes problem returns - any ideas?

    Hi,
    According to your description, my understanding is that webpages takes so long to load(some webpages can't even load) after upgrading to Windows Server 2008 R2.
    Which server has been upgraded to Windows Server 2008 R2? And what is the OS version before upgrading?
    >If I add Fios DNS on DHCP's DNS, the webpages load so fast.
    I am wondering that if the webpages mean Internet webpages. Check the settings on DNS server which connects to external network about forwarders or root hints. Or you may configure the Fios DNS as forwarder of your DNS server.
    >I can't use the computer name to access to other internal sites. I have to use IP address instead.
    Open the DNS server and confirm that if corresponding DNS entries are correct. Besides, open CMD, type the command below and each line end with enter:
    Nslookup
    set d2
    <computer name you want to access>
    Post the result here, and also provide the ipconfig /all result here.
    >Workstations can't get the update Group Policy from DCs.
    Make sure that you are running the most current drivers for your network adapter. If you are already running the most current drivers for your network adapter, run command line to update GP:
    gpupdate
    If any problem, post the result/error message. And check the event viewer to see if related log there.
    Best Regards,
    Eve Wang
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Why is my mac taking so long to load videos

    why is my mac taking so long to load videos

    This may have something to do with your Internet connection, the size of the video you are watching or the amount of items running in your Mac at the same time.

Maybe you are looking for