Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4550476
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T16:30:05+00:00 2026-05-21T16:30:05+00:00

I am executing the following line, as soon as the Tomcat server(5.5.28) is started..

  • 0

I am executing the following line, as soon as the Tomcat server(5.5.28) is started..

URL  url = new URL("http://localhost:80/servlets/ConnectionCheckServlet");
URLConnection uc = url.openConnection();
long t=System.currentTimeMillis();
//InputStream content = (InputStream)uc.getInputStream();
InputStream content = (InputStream)url.openStream();
System.out.println("Time diff: "+(System.currentTimeMillis()-t));

The Timediff in millisecs got printed as Time diff: 5141 (> 5 Seconds)

For the subsequent call on the same servlet or for a different servlet, the time diff is actually less than a second.

Will the first time delay, some thing to do with Tomcat intialization??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T16:30:06+00:00Added an answer on May 21, 2026 at 4:30 pm

    I guess it could be due to compilation and/or caching of the servlet which could occur the first time accessed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ok so i'm executing the following line of code in javascript RegExp('(http:\/\/t.co\/)[a-zA-Z0-9\-\.]{8}').exec(tcont); where tcont
I am trying to install BDE Engine by executing the following command line from
Executing the below code gives me the following exception on the last line: InvalidOperationException:
Executing in method checkUnique the line $res=$select->fetchArray(); in the following class I get an
In executing the following line in bash: set -e p=$(mktemp -t ${1}.$$.XX) mktemp fails
In my service I am executing the following line: return Response.created(someuri).build(); Then in my
The following line printed output as 4 whereas I was expecting 0. printk(KERN_INFO size
I get an exception while executing following piece of code bool FieldValueMessage::Get(const std::string &field,
Executing the following sql: USE [WSS_Content] EXEC sp_helplogins returns two result sets, and within
Try executing the following in JavaScript: parseInt('01'); //equals 1 parseInt('02'); //equals 2 parseInt('03'); //equals

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.