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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:38:42+00:00 2026-06-17T11:38:42+00:00

I am having an issue with a struts 2 application. User 1 logs in

  • 0

I am having an issue with a struts 2 application.
User 1 logs in successfully and is redirected to some page.
After that ,
User 2 tries to login from her machine, she get redirected to user1’s landing page.

I am not sure if that is an issue with the web container(web logic) or some issue in my coding.I am not able to figure out where I can go wrong and how the server can provide data from another users session.

The login action implements sessionaware, I have setter and getter for the session Map.
If the login action returns sucesss user is redirected to another action where again the action implements sessionaware.

The problem is really weird. Can anyone suggest any reasons why it can be happening.

Also to add to the complexity , the same application ear works fine locally. The problem occurs only when I am trying to deploy it to test server.

Here is the intercepotr code. I don’t think it is thread unsafe.

public class UserAuthentication extends AbstractInterceptor
{
    public UserAuthentication()
    {
    }

    public void init(){//System.out.println("init'd");
    }

    public void destroy() {System.out.println("destroyed");}

    public String intercept(ActionInvocation invocation) throws Exception
    {      
        String className = invocation.getAction().toString();
        Map OHRMS = ActionContext.getContext().getSession();

         System.out.println("EmpInfoUpd: " + new Date() + " Inside the interceptor: ");  
        System.out.println("EmpInfoUpd: " + new Date() + " Interceptor called for action: " + className); 
        System.out.println("EmpInfoUpd: " + new Date() + " Now printing the entries of session map from interceptor: " + OHRMS);


        Employee temp = (Employee)OHRMS.get("emp");
        if(temp==null)  
        { System.out.println("EmpInfoUpd: " + new Date() + " The session had no \"emp\" object. Interceptor returned \"login\" ");
            return "login";
        }
        System.out.println("EmpInfoUpd: " + new Date() + " The session had \"emp\" object with Employee name: " + temp.getFullName()+ " Interceptor returned \"login\" ");
            return invocation.invoke();

    }
}
  • 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-17T11:38:43+00:00Added an answer on June 17, 2026 at 11:38 am

    Thanks everyone for your efforts.
    The problem was I was using .html extension for all the struts pages, and the test web-server thought they were static pages. So returned the last page serviced. The problem is finally resolved after changing extension of the pages to .action

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

Sidebar

Related Questions

I having issue that content assistant / intellisense is working in methods such as
Hi guys I am having issue I have this query: SELECT * FROM useraccount
Having an issue with a salesforce login on our site. When the customer fills
I am having issue connecting from ROR 3.2 to Oracle database. irb(main):001:0> gem 'ruby-oci8',
I am having issue with opencv's Sobel edge detector. From its documentation it seems
Having issue with displaying the Data from a second Activity. when I run the
We have a device that support SAE J1939 interface and having issue with finding
Im having issue with mail sending In web.config file <mailSettings> <smtp from=xxxx@companyname.com> <network host=mail.authsmtp.com
I've successfully pulled in the JSON below however I am having an issue turning
I'm having issue assigning regex value to a string. Issue that I have is

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.