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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T15:23:40+00:00 2026-05-21T15:23:40+00:00

Here’s my issue: I have a html form that after a user fills in

  • 0

Here’s my issue:

I have a html form that after a user fills in all the required fields I need to do two things.

1st. I save the values in a javabean using the jsp:setProperty name=”bean” property=”*”/
call
2nd. I move to a new page. However the page I move to depends on what the user has submitted in one of the fields.

I currently have the following javascript call on my button to execute the change of page:

$(“#entry”).submit(function(){
if(validate()){
var value = $(“#dataSource”).val();
if(value == “Production”){
window.location=”CAPARequestProduction.jsp”;
}else if(value == “Customer/Warranty”){
window.location=”CAPARequestCustWarr.jsp”;
}else{
alert(“INVALID CHOICE: Please choose Production or Customer/Warranty”);
}
}
});

THe jsp:setProperty call loops through the values and stores them in the bean.

Here’s my issue….when the submit button is pressed, the javascript is called and the field validation occurs and the browser starts to access the new .jsp, however as soon as it has finished and before the new .jsp has loaded the setProperty call executes and after it executes it returns me to my original page.

How can I perform both the javascript call and the setProperty call and still move to the next page?

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-21T15:23:41+00:00Added an answer on May 21, 2026 at 3:23 pm

    I solved this problem by setting the action value in my form to an intermediate jsp I called redirect. From within redirect I was able to call the jsp:setProperty which set all the values in the bean. The validation was also done in the redirect.jsp using scriplets and the jsp:getProperty function. From there I moved to the corresponding page using the jsp:forward function.

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

Sidebar

Related Questions

Here is a scenario: User installs .NET application that you have made. After some
Here is the issue I am having: I have a large query that needs
Here's the setup - I have a view that lists products. On that same
Here is my code...I have two dimensional matrices A,B. I want to develop the
Here is my code (Say we have a single button on the page that
Here's the flow that I am trying to achieve: 1) User uploads an audio
Here's a problem I ran into recently. I have attributes strings of the form
Here's my scenario - I have an SSIS job that depends on another prior
Here is my code, which takes two version identifiers in the form 1, 5,
Here is an example of what I need http://code.google.com/webtoolkit/doc/latest/tutorial/gettingstarted.html I need interactive list to

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.