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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:16:27+00:00 2026-06-11T19:16:27+00:00

I have session invalidation code which will invalidate a user’s session if he is

  • 0

I have session invalidation code which will invalidate a user’s session if he is idle for some time. Before invalidating the session I have to show a Jquery dialog box 1 minute before invalidating and ask the user if he wants to continue or logout.

Below is part of the code I have,

$j("#dialog").dialog({
buttons: {
'Yes, Continue': function()
 {
   $j.ajax({
    url: 'http://myDomain/session_extend.jsp',

Whatever code I have is working fine.

Problem is, I have 3 environments (Development, testing & Production). This code is there in my web application. Everytime there is a code change it has to be moved to Development, testing and Production. And everytime I need to change the domain in the above URL and deploy in respective environments.

Is it possible to take the URL value from some property file? Or are there any other means to solve my problem?

  • 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-11T19:16:29+00:00Added an answer on June 11, 2026 at 7:16 pm

    You can get your host name by using javascript like

    var host = location.protocol+"//"+location.host+"/";
    var pageUrl = host + "session_extend.jsp";
    

    and you can pass this pageUrl in ajax url like

    $j("#dialog").dialog({
      buttons: {
       'Yes, Continue': function()
       {
         $j.ajax({
           url: pageUrl,
    

    I hope, It will help.

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

Sidebar

Related Questions

for example i have Session::instance()->get('orders') which is an array of some arrays: $first =
i have session code it's working fine but some friend told me this code
I have an implementation of javax.servlet.http.HttpSessionListener that is supposed to detect user session invalidation/timeout
Should I constantly have a session open in my web site with user accounts,
A quick questions about sessions, I have a session with the following code <?php
I have a stateless session bean with a method which throws an exception (which
When googlebot crawls pages does it have session? For example I am storing some
I have a (HTTPS) login.php page which remains HTTPS (ie once user logged in
I have session key that is a JavaScript variable which I got from a
I have following code <select name=status_drop id=status selected=<%=session[:status]%> > <option value=0>Completed</option> <option value=1>Not Completed</option>

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.