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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:50:53+00:00 2026-06-17T23:50:53+00:00

i hav created a jsp page from which i m taking some values and

  • 0

i hav created a jsp page from which i m taking some values and on submit it should pass the parameters to the java class using rest.

< form id=”payment” method=”post” action=”addtogroup”>

< ol style=”padding: 0;”>

< li>< label for=”groupId”>Group id:< /label>

< input type=”text” id=”groupId” name=”groupId”/>

< br />

< li>< label for=”vendorId”>Profile Id :< /label>

< input type=”text” id=”vendorId” name=”vendorId”/>

< li>
< input type=”submit” value=”Submit”/>

< br />
< /ol>
< /form>

and the java code is:

@RequestMapping(value = “/addtogroup/{groupId}/{vendorId}”,method = RequestMethod.POST)

public String addtoGroup(@ModelAttribute("groupId") String groupId,@ModelAttribute("vendorId") String profileId){       
    Authentication auth = SecurityContextHolder.getContext().getAuthentication();
     String username = auth.getName();
     System.out.println("group id is="+groupId);
     System.out.println("profileId  is="+profileId);
     System.out.println("username  is="+username);
     grpDao.addToGroup(groupId,profileId,username);

    return "addtogroup";
}

when i type [http://localhost:8080/biznex/rest/addtogroup/2/13] in the address bar directly the code is executed.
but when i click submit button in the jsp i get page not found error.
plz help me out.

  • 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-17T23:50:55+00:00Added an answer on June 17, 2026 at 11:50 pm

    < form id="payment" method="post" action="addtogroup"> This statement means submit the FORM data using POST method to the url “currentpath”/”addtogroup”

    However, your RESTFUL Server side component expects the url in the form of /addtogoup/{groupid}/{vendorid} in a GET method

    I would suggest you to have a JavaScript method which converts your form fields to the URI path- using jQuery or plain JavaScript

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

Sidebar

Related Questions

I hav been going over some old hw assignments from a class last semester.
I have created a C++/CLI mixed DLL which I am using from C# Winforms
hi i want to retrieve values from SQL database for xml tags using java
I hav a php code where it displays buttons from A-Z: <table id=optionAndAnswer class=optionAndAnswer>
I hav created a lib which reads an XAML file and generates a HUD
Our Java code (not the test code) reads files from the current directory, which
I hav especific need of removing word from string, But I am having problem
I hav to save the values of NSUserDefault to the Array,and later on have
I hav created a group of textboxes using a loop and its names are
I have usercontrols which inherit a base class which looks like this: BasePage.cs: using

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.