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

  • SEARCH
  • Home
  • 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 8975815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:58:32+00:00 2026-06-15T18:58:32+00:00

In my web-app the client pings the server (tries to contact a ping servlet

  • 0

In my web-app the client pings the server (tries to contact a ping servlet on the server) wheere the address / resource locator of the servlet is :

"192.168.43.187/server/ping?" + new ClientAddress().getNetworkIP();

Till now the client has been sending it’s network IP to the server with every ping. I wanted to add another piece of information with this URL,which is new GregorianCalendar().getTimeInMillis(); .

How do I send this along ?

Note :

In the URL, ping is a servlet

  • 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-06-15T18:58:33+00:00Added an answer on June 15, 2026 at 6:58 pm

    I would construct the URL thus:

    "192.168.43.187/server/ping?ip=" + (new ClientAddress().getNetworkIP()) + "&time=" + (new GregorianCalendar().getTimeInMillis());
    

    and use the servlet request method ServletRequest.getParameter() to extract the values.

    Note that ServletRequest.getRemoteAddr() gives you the client address. Do you need to pass it explicitly ? Additionally, constructing a URL by string concatenation works in this trivial scenario, but as soon as you pass values that include characters such as spaces etc. you’ll need to encode these values.

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

Sidebar

Related Questions

In my web-app the client is both the server and client at the same
I have setup a web app for a client. The server is in US
I have a client-server web app I'm working on. There's a point in the
I have a client app that constantly pings server with mysql_ping() . This is
I am developing a reporting web app for a client of mine. Their accounting
I need to create a web app for a client, and one of the
Our client's web app restarts suddenly at random intervals. For each restart, we've found
I have a web app that lets a client define a daily rate for
I'm developing a web app for which the client wants us to query their
Client wants a button on the mobile web app that launches a QR code

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.