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

  • Home
  • SEARCH
  • 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 700001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:26:55+00:00 2026-05-14T03:26:55+00:00

I have an action bean in my stripes application. The default handler/method will display

  • 0

I have an action bean in my stripes application. The default handler/method will display a list of data, a list of all my MarketResearch objects

On my JSP, I can click on one to view its details, this takes me to a different JSP with a pre-populated form based on the particular MarketResearch object that you selected.

I have another method on my action bean which is mapped to the save submit button, this takes in what is on the amended form, and persists it. After this has taken place, I want it to redirect back to the form, rather than to the listing (default handler) action, is this possible?

My action is as follows :

public class MarketResearchAction extends BaseAction
{

    @SpringBean
    ClientService clientService;
    private static final String VIEW = "/jsp/marketResearch.jsp";
    private Client client;
    private Client clientBeforeChanges;


    public Client getClient()
    {
        return client;
    }

    public void setClient(Client client)
    {
        this.client = client;
    }

    @DefaultHandler
    public Resolution viewAll()
    {
        return new ForwardResolution(VIEW);
    }

    public Resolution viewClientMarketResearch()
    {
        if (client.getSector().equals("Education"))
        {
            return new ForwardResolution("/jsp/marketResearchEducation.jsp");
        } else if (client.getSector().equals("Local Government"))
        {
            return new ForwardResolution("/jsp/marketResearchLocalGovernment.jsp");
        } else if (client.getSector().equals("Housing Association"))
        {
            return new ForwardResolution("/jsp/marketResearchHousing.jsp");
        }
        return new ForwardResolution("/jsp/viewClientMarketResearch.jsp");
    }

    public Resolution save()
    {
        clientBeforeChanges = clientService.getClientById(client.getId());
        clientService.persistClient(client);
        getContext().getMessages().add(new SimpleMessage("{0} updated", client.getName()));
        return new RedirectResolution("/MarketResearch.action").flash(this);
    }

    public Client getClientBeforeChanges()
    {
        return clientBeforeChanges;
    }

    public void setClientBeforeChanges(Client clientBeforeChanges)
    {
        this.clientBeforeChanges = clientBeforeChanges;
    }

    public ClientService getClientService()
    {
        return clientService;
    }

    public void setClientService(ClientService clientService)
    {
        this.clientService = clientService;
    }


}

Is it possible? Or am I approaching the situation from a bad angle and should re-factor?

Thanks

  • 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-14T03:26:56+00:00Added an answer on May 14, 2026 at 3:26 am

    Yes. You could return a RedirectResolution to the form jsp. If you’re having difficulty with the parameters, if you have them in the save() method, you could do like so:

    return new RedirectResolution("/theJsp.jsp")
        .addParameter("one", one)
        .addParameter("two", two)
        .addParameter("three", three)
        .flash(this);
    

    If you don’t have the params that were passed to the form, you’ll have to keep them going somehow. You could pass the MarketResearch object through the form so you’d have it there.

    <stripes:hidden name="marketResearch"  value="${ActionBean.marketResearch}"/> 
    

    And add the requisite instance variable/getter/setter on your MarketResearchActionBean.

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

Sidebar

Ask A Question

Stats

  • Questions 354k
  • Answers 354k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer function getSubdomain() { var re = /http\:\/\/(\w+)\.somesite\.com\//; return (re(document.location)[1]); } May 14, 2026 at 8:30 am
  • Editorial Team
    Editorial Team added an answer You can make use of usort function as: $arr =… May 14, 2026 at 8:30 am
  • Editorial Team
    Editorial Team added an answer You can try python-poppler. Poppler is a well known PDF… May 14, 2026 at 8:30 am

Related Questions

I'm building a web application using Stripes and Spring. It needs to have a
I'm doing a project in seam that requires restful URLs. I have a view
I'm working on my first java struts2 webapp and want to be able to
In the Web Flow below I bind form data to a flow variable (lifeCycleForm)
I have two bean Code: public class ApplContactDtl { ....... And Code: public class

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.