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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:28:13+00:00 2026-06-13T12:28:13+00:00

I have 2 JSPs: pay.jsp , confirmPay.jsp User submits data (credit card# etc.) on

  • 0

I have 2 JSPs: pay.jsp, confirmPay.jsp

User submits data (credit card# etc.) on pay.jsp. This data is validated at the backend and is displayed along with some other data, on confirmPay.jsp. Once he clicks on ‘Confirm’, the data (from the pay.jsp page) is used for billing. If he clicks ‘Cancel’, the payment is discarded.

The important things here are:

  1. Data should be modifiable only in pay.jsp
  2. Data should be preserved between the two calls

I know this question is similar to How to preserve the ModelMap between form submits?. Just wanted to know what works for situations like this, that involves sensitive information (like credit card#). Putting it in a session would mean that multiple calls in the same function will create issues.

Please help me understand what the best choice is.

  • 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-13T12:28:14+00:00Added an answer on June 13, 2026 at 12:28 pm

    If you’re concerned about storing sensitive data in the session, then don’t worry. The session is held in memory at server-side. It doesn’t goes on the wire, and can’t be read from the browser memory of by an intruder on the network.

    If you’re concerned about users having multiple opened browser tabs or frames on the same pages, and sending several payments in parallel, in the same session, then it’s a very valid concern. I tend to prefer stateless solutions, so if hidden fields are an acceptable solution, then just use them to maintain state from one page to the next one. This won’t cause any problem with multiple tabs. If you need to use the session to store intermediate state, then you can simply generate a unique ID (using a sequence number, for example), store the data in the session using the unique ID as session attribute, and pass this unique ID frompage to page using a hidden field. That way, multiple tabs will use different session attributes, and won’t disturb each other.

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

Sidebar

Related Questions

this is what I want to achieve I have three view i.e JSPs.Event.jsp,EventCancel.jsp and
I have three JSPs named a.jsp , b.jsp and c.jsp . From a.jsp I
I have two jsps. One is login_first.jsp , another one is main.jsp . After
How do you stop a JSP from executing? I have JSPs which kick the
I have 2 JSPs: page1.jsp and page2.jsp . the output of page1.jsp , under
I have a JSP, that includes 3 more JSPs. On click of a button
I have searched on this and found something about using remotely hosted JSPs but
I am a newbie to writing JSPs. In my JSP I have dynamically created
I have this Java code some other person wrote, specifically JSPs. I am trying
I have two different JSPs that the Java backend concatenates together and sends back

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.