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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:17:45+00:00 2026-05-23T11:17:45+00:00

in my webapp I made two different sessionhandler classes inheriting from a class called

  • 0

in my webapp I made two different sessionhandler classes inheriting from a class called SessionHandler

Now I’d like to initiate the appropriate handler (dependent on a cookie value.)

Background: My SessionHandler should be the base class of the Controller as it needs to call a Controller backend method otherwise i would assign the handler object to a ctrl member

Is there a way to set the superclass at runtime?

Or other way to solve that? Hope you got what i meant!

  • 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-23T11:17:46+00:00Added an answer on May 23, 2026 at 11:17 am

    I am not sure I entirely understood your question, but are you sure you need to use inheritance? Couldn’t the class you need just be a member instead?

    Changing the superclass at runtime does not sound like a very good design, if at all possible.

    Just to be sure I got you, what you want to do is have Controller inherit from one of the SessionHandlers, but select which one at runtime? I would rather make Controller have a member variable of type SessionHandler.

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

Sidebar

Related Questions

So a webapp I've been working on broke, and I made some fixes... it
I am trying to make general purpose image display class which receives two parameters,
I made a webapp where I need html content to popup on top of
I have made a webapp for my android phone where I can check the
I got webapp (made with appengine-magic and lein) working on dev_appserver.sh but because I
I'm making a webapp and I'm using jQuery. I've made a simple android application
I am creating a webapp that relies on following a status timeline from twitter
I've been coding a webapp for some time now and all the layout, css
I've made a simple iPhone webapp and I've set a startup screen and icon
Assuming you have a project setup like this: -WebApp |_ requirements.txt |_ bootstrap.py (virtualenv

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.