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 8129997
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T08:31:41+00:00 2026-06-06T08:31:41+00:00

I have two servlets. 1 serves as a primary server for my applet clients

  • 0

I have two servlets. 1 serves as a primary server for my applet clients and other serves as secondary.

I just want for my servlet2(secondary) to ask servlet1 about number of sessions it have, suppose servlet1 is storing that information in an int, then how can we access that int from servlet2. provided that both servlets are different web projects.

  • 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-06T08:31:43+00:00Added an answer on June 6, 2026 at 8:31 am

    This is a bad design you are trying to implement. What you really need is an Application Scope Variable

    Quoting from http://www.daniweb.com/web-development/jsp/threads/78622/difference-between-session-and-application-scope-at-jsp

    ‘Application scope is the broadest scope and should only be used when necessary. You can create objects bound at application level in JSPs that are not session-aware, so application scope is useful for storing information when using these types of JSPs. You can also use application-bound objects to share data among different sessions of the same application.’

    Take a look at this example that makes use of a counter as Application Scope Variable http://java.sun.com/developer/onlineTraining/JSPIntro/exercises/Counter/index.html

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

Sidebar

Related Questions

I have two CNAME-s pointed to the same server. I want to assign one
I have two servlets below and work well with Tomcat7/Indigo, it will print '
I have two DropDownListBoxes one is called ddlDay and the other is ddlMonth. As
I have two application that need to talk to each other. App1 needs to
I have two Java Projects. One is a normal Java Project. I want to
I have two * Servlet * and i want to run both Servlet on
I have a tomcat server with two webapps (foo and bar) that have an
I have two servlets which are running on different tomcat servers. I and trying
I have two servlets each in a separate web app running in the same
I have a jetty container with two different servlets, lets call then A and

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.