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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:09:50+00:00 2026-06-08T21:09:50+00:00

I want to solve the following problem, it’s about deleting entities from a database:

  • 0

I want to solve the following problem, it’s about deleting entities from a database:

  1. The user selects Delete for a certain entity
  2. The is deleted from the database and disappeared from the list
  3. An undo frame appears inside the page (like Twitter Bootstrap alert messages), where the user can choose to undo the deletion.

I don’t know how to realize this, because at the moment I solve this that way:

  • Delete button links to the URL: delete/entity_id
  • I have written an if-case for this URL in my request handler that deletes the entity
  • after the deletion is done, I send a response.sendRedirect(/list) so the updated list is shown

This way I cannot send additional data by redirecting it. Normally I would send the extra data by processing them via the template, but with redirect this is not possible.

How is such a sitation solved?

  • 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-08T21:09:51+00:00Added an answer on June 8, 2026 at 9:09 pm

    You could use the setAttribute() and getAttribute() methods of HttpSession. After all that’s a way how you can pass Java objects over different HTTP requests.

    In your case you could create such an Undo object and store it in the session. After the redirect you have described the session object is retrieved and its content is passed to the template.

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

Sidebar

Related Questions

I want to solve the following optimization problem: Non-Latex: Given x and mu, find
I have the following problem that I want to solve in awk. I have
How can i solve the following (simplified) problem? M-V-VM context. I want to show
I'm trying to use STL to solve the following problem (I don't want to
I have a following problem I want to solve ellegantly: public interface IMyclass {
I wonder how to solve the following problem: I want to get access to
does anyone know how I can solve the following problem. I want to return
I have a following problem I want to solve efficiently. I am given a
I am currently investigating using NServiceBus to solve the following problem. I just want
I have the following problem: I want that the user make a download when

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.