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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T03:16:49+00:00 2026-05-21T03:16:49+00:00

I need to submit a form using JavaScript. The problem is my JavaScript POST

  • 0

I need to submit a form using JavaScript. The problem is my JavaScript POST request gets an “OK — 200” response. In order to make it 302 I think I need to use response.sendredirect in my JavaScript JSP function. Can any body tell me how to use it? With example code.

  • 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-21T03:16:49+00:00Added an answer on May 21, 2026 at 3:16 am

    You won’t use response.sendredirect in your JavaScript, there’s no such thing. If you’re submitting a form using JavaScript, then JavaScript is your HTTP client. It sends the POST request, with the form data, to whichever server you’re submitting to.

    The server then sends the HTTP response back to your JavaScript. It’s currently sending 200, but you’re looking for it to return a 302 redirect instead. You’d use response.sendredirect on the server to do that — it’s not part of your JavaScript. There’s also no way to specify what sort of response you want in HTTP. It’s entirely up to the server.

    So, judging by your tags, you’ll want to use response.sendredirect in your JSP code on the server. I’m afraid I’m not familiar with JSP, so I can’t really help there. It might help other answerers if you post some of your server-side code though — at the moment we’ve got no idea what’s going on there.

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

Sidebar

Related Questions

I need to pause for maybe 500 miliseconds before I submit a form. Here
Hoi! I have a form I wish to submit, but I need to add
I have a form that I need to submit automatically... (the fields are already
I have a search box that doesn't have a submit button, I need to
I have a wizard-style HTML form with a row of submit buttons for the
A few days ago I posted this question: switch statement and loops using jquery/javascript
I am using the jQuery Form Plugin with my Rails app. I have a
For an iPhone app that submits images to a server I need somehow to
Need a function that takes a character as a parameter and returns true if
Need a way to allow sorting except for last item with in a list.

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.