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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T17:12:18+00:00 2026-05-11T17:12:18+00:00

Having replaced a <jsp:forward page=URL> with a response.sendRedirect(URL); , I find I know lose

  • 0

Having replaced a <jsp:forward page="URL"> with a response.sendRedirect("URL");, I find I know lose the session once the redirect occurs. Is there a way to preserve the session with a redirect, or to reconstitute the session cookie and send it along with the redirect?

I know I could use JavaScript via window.location = "URL";, but that is far from ideal!

Any help?

  • 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-11T17:12:18+00:00Added an answer on May 11, 2026 at 5:12 pm

    You should not have to resend the cookie, because if you had a session established, the cookie should already be on the client (the browser).

    Are you sure you lose the session? How do you detect this? Do you have a new session in the page represented by the url you redirect to?

    Does the browser accept cookies? Otherwise you should use url rewriting. This is the most probable cause. You could try use HttpServletResponse.encodeRedirectURL before passing the url to response.sendRedirect.

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

Sidebar

Related Questions

I am having some frustrating javascript timing issues. FYI, the page is a jsp
I have a JSP page that renders a block of HTML. In normal usage,
I am trying to change/replaced the action attribute in a form but am having
I'm having troubles with rendering response via AJAX. Here is how my .js.haml view
i'm having a memory issue while testing a find/replace function. Say the search subject
On an aspx page i am having a dropdownlist and a panel control the
I am generating dynamically some selects in a jsp page with javascript. The code
I'm having a hard time modifying PsGet to work though a proxy. I replaced
Having a problem with an email form. When clicking submit doesn't recognize page. Am
I am having an issue removing %3Cbr+%2F%3E from my string using the preg_replace function.

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.