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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:37:36+00:00 2026-05-26T23:37:36+00:00

I am new on using the Stripes framework and I need some help. I

  • 0

I am new on using the Stripes framework and I need some help.

I want to call a method of an ActionBean from another ActionBean.

For example, I have two ActionBean:

@SessionScope
public class SessionActionBean extends AbstractActionBean{

    private String property;        

    public void setUsername(String username) {
        this.username = username;
    }
}

And

public class TestActionBean extends AbstractActionBean {

    ...

    public Resolution submitTest() {        

        //TODO Call setUsername is SessionActionBean
    }

    ...
}

How do I call the setUsername of the SessionActionBean from TestActionBean? And if the SessionActionBean was not session scoped?

Thanks in advance

  • 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-26T23:37:36+00:00Added an answer on May 26, 2026 at 11:37 pm

    A few things:

    If you want to store data in a user’s session, @SessionScope isn’t really what you want. You’d be better off extending ActionBeanContext and writing some getters and setters that store in context. See http://www.stripesframework.org/display/stripes/State+Management for more details.

    If you really really want to use @SessionScope, make sure you read the caveat in the javadoc and make sure that’s really what you need.

    http://stripes.sourceforge.net/docs/current/javadoc/net/sourceforge/stripes/action/SessionScope.html

    Since session scope ActionBeans are not generally encouraged by the
    author, very few allowances will be made in Stripes to accommodate
    session scope beans.

    Finally, actually invoking methods from one action bean to the other is as simple as instantiating the bean and calling the method. It’s kind of weird and backwards and the instantiated bean won’t inherit Stripes context stuff, but you can do it.

    If you’d rather have one @Resolution call another @Resolution, you can do that too: ForwardResolution(Class<? extends ActionBean> beanType).

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

Sidebar

Related Questions

I still very new using Subversion. Is it possible to have a working copy
I'm new to using LINQ to Entities (or Entity Framework whatever they're calling it)
I am fairly new at using the ASP.NET MVC framework and was hoping that
I am currently working with Stripes and I have an ActionBean that loads a
I'm having an issue using Stripes validation method. It works but rather than returning
I have a richTextBox I am using to perform some syntax highlighting. This is
I'm new to database design and am currently using MySQL Workbench to help me
My table is being populated using ajax from a mysql database. I have a
I'm using argparse and I want to display a list in the help text
Maybe this is a very silly question but I'm new using django. I have

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.