Using Request Method GET and params=formaction together in a single methodData binding of @ModelAttribute annotated parametersRun a single test method with mavenAutowired bean is null in MVC ControllerSpring - ModelAttribute and parameter namesSpring MVC 3.0 - restrict what gets routed through the dispatcher servletSpring getting error in get attribute methodwhy we need to use get method inside a java file @RequestMapping(method = RequestMethod.GET)How to render partial view in Spring MVCSpring MVC cannot find method in controller when using POST requestWhy does using @Valid with @ModelAttribute result in exception?

Is there any road between the CA State Route 120 and Sherman Pass Road (Forest Route 22S0) that crosses Yosemite/Serria/Sequoia National Park/Forest?

How to get distinct values from an array of arrays in JavaScript using the filter() method?

Have ejective consonants ever arisen on their own?

How to decide whether an eshop is safe or compromised

90s(?) book series about two people transported to a parallel medieval world, she joins city watch, he becomes wizard

Convert HTML color to OLE

Infinite loop in CURSOR

How much code would a codegolf golf if a codegolf could golf code?

How does turbine efficiency compare with internal combustion engines if all the turbine power is converted to mechanical energy?

Sous vide chicken without an internal temperature of 165

Is it appropriate for a business to ask me for my credit report?

How can I describe being temporarily stupid?

Why should someone be willing to write a strong recommendation even if that means losing a undergraduate from their lab?

Hai la patente? - omission of possessive adjective

Have only girls been born for a long time in this village?

Is "stainless" a bulk or a surface property of stainless steel?

"Silverware", "Tableware", and "Dishes"

Repurpose telephone line to ethernet

Should my "average" PC be able to discern the potential of encountering a gelatinous cube from subtle clues?

Why do some academic journals requires a separate "summary" paragraph in addition to an abstract?

Did the twin engined Lazair ultralight have a throttle for each engine?

How does the Saturn V Dynamic Test Stand work?

Are illustrations in novels frowned upon?

How big would a Daddy Longlegs Spider need to be to kill an average Human?



Using Request Method GET and params=formaction together in a single method


Data binding of @ModelAttribute annotated parametersRun a single test method with mavenAutowired bean is null in MVC ControllerSpring - ModelAttribute and parameter namesSpring MVC 3.0 - restrict what gets routed through the dispatcher servletSpring getting error in get attribute methodwhy we need to use get method inside a java file @RequestMapping(method = RequestMethod.GET)How to render partial view in Spring MVCSpring MVC cannot find method in controller when using POST requestWhy does using @Valid with @ModelAttribute result in exception?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I want to create a method which has both (@RequestMapping(method=RequestMethod.GET) and @RequestMapping(params= "formaction= selectCustomer)) on the click of a SINGLE button



This is because .GET method gets called first and that is a compulsory method whereas I want params="formaction= selectCustomer" to fetch customer details from the same method used in a different class.



I have already tried @RequestMapping(method=RequestMethod.GET, params= "formaction= selectCustomer") but it did not work



@Resource (name = "control")
private Controller control;


@Override
@RequestScope
@RequestMapping(method=RequestMethod.GET, params= "formaction= selectCustomer")
public ModelAndView form(Request request, Model model, @ModelAttribute Command command, BindingResult result) {

return this.control.getData(request, model, command, result)


This getData method is in another class inside same package that usually gets all the data when accessed from a different workflow.



So basically I want the formAction to fetch me the customer data but how to use it with .GET ?



I also tried to make two seperate methods for .GET and formaction and I called the formaction method inside the .GET method but it did not fetch me the data. I am afraid I will get the data only if the method is called using param=formaction notation










share|improve this question


























  • Is it compiling?

    – JustAFellowCoder
    Mar 27 at 14:49











  • Yes it is. But on clicking the button, it says webpage not found.

    – Anmol Khanna
    Mar 27 at 14:50











  • Wild guess but if you want both, couldn't you make two separate methods, with different RequestMappings, and one also calls the other?

    – JustAFellowCoder
    Mar 27 at 14:54











  • I tried that, but it doesn't fetch me the details from the getData method. It will fetch me the data if called as a formaction I suppose.

    – Anmol Khanna
    Mar 27 at 14:57











  • Not sure if it matters the order, but isn't method supposed to be after params?

    – JustAFellowCoder
    Mar 27 at 15:05

















0















I want to create a method which has both (@RequestMapping(method=RequestMethod.GET) and @RequestMapping(params= "formaction= selectCustomer)) on the click of a SINGLE button



This is because .GET method gets called first and that is a compulsory method whereas I want params="formaction= selectCustomer" to fetch customer details from the same method used in a different class.



I have already tried @RequestMapping(method=RequestMethod.GET, params= "formaction= selectCustomer") but it did not work



@Resource (name = "control")
private Controller control;


@Override
@RequestScope
@RequestMapping(method=RequestMethod.GET, params= "formaction= selectCustomer")
public ModelAndView form(Request request, Model model, @ModelAttribute Command command, BindingResult result) {

return this.control.getData(request, model, command, result)


This getData method is in another class inside same package that usually gets all the data when accessed from a different workflow.



So basically I want the formAction to fetch me the customer data but how to use it with .GET ?



I also tried to make two seperate methods for .GET and formaction and I called the formaction method inside the .GET method but it did not fetch me the data. I am afraid I will get the data only if the method is called using param=formaction notation










share|improve this question


























  • Is it compiling?

    – JustAFellowCoder
    Mar 27 at 14:49











  • Yes it is. But on clicking the button, it says webpage not found.

    – Anmol Khanna
    Mar 27 at 14:50











  • Wild guess but if you want both, couldn't you make two separate methods, with different RequestMappings, and one also calls the other?

    – JustAFellowCoder
    Mar 27 at 14:54











  • I tried that, but it doesn't fetch me the details from the getData method. It will fetch me the data if called as a formaction I suppose.

    – Anmol Khanna
    Mar 27 at 14:57











  • Not sure if it matters the order, but isn't method supposed to be after params?

    – JustAFellowCoder
    Mar 27 at 15:05













0












0








0








I want to create a method which has both (@RequestMapping(method=RequestMethod.GET) and @RequestMapping(params= "formaction= selectCustomer)) on the click of a SINGLE button



This is because .GET method gets called first and that is a compulsory method whereas I want params="formaction= selectCustomer" to fetch customer details from the same method used in a different class.



I have already tried @RequestMapping(method=RequestMethod.GET, params= "formaction= selectCustomer") but it did not work



@Resource (name = "control")
private Controller control;


@Override
@RequestScope
@RequestMapping(method=RequestMethod.GET, params= "formaction= selectCustomer")
public ModelAndView form(Request request, Model model, @ModelAttribute Command command, BindingResult result) {

return this.control.getData(request, model, command, result)


This getData method is in another class inside same package that usually gets all the data when accessed from a different workflow.



So basically I want the formAction to fetch me the customer data but how to use it with .GET ?



I also tried to make two seperate methods for .GET and formaction and I called the formaction method inside the .GET method but it did not fetch me the data. I am afraid I will get the data only if the method is called using param=formaction notation










share|improve this question
















I want to create a method which has both (@RequestMapping(method=RequestMethod.GET) and @RequestMapping(params= "formaction= selectCustomer)) on the click of a SINGLE button



This is because .GET method gets called first and that is a compulsory method whereas I want params="formaction= selectCustomer" to fetch customer details from the same method used in a different class.



I have already tried @RequestMapping(method=RequestMethod.GET, params= "formaction= selectCustomer") but it did not work



@Resource (name = "control")
private Controller control;


@Override
@RequestScope
@RequestMapping(method=RequestMethod.GET, params= "formaction= selectCustomer")
public ModelAndView form(Request request, Model model, @ModelAttribute Command command, BindingResult result) {

return this.control.getData(request, model, command, result)


This getData method is in another class inside same package that usually gets all the data when accessed from a different workflow.



So basically I want the formAction to fetch me the customer data but how to use it with .GET ?



I also tried to make two seperate methods for .GET and formaction and I called the formaction method inside the .GET method but it did not fetch me the data. I am afraid I will get the data only if the method is called using param=formaction notation







java spring model-view-controller overriding request-mapping






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 28 at 5:01







Anmol Khanna

















asked Mar 27 at 14:45









Anmol KhannaAnmol Khanna

137 bronze badges




137 bronze badges















  • Is it compiling?

    – JustAFellowCoder
    Mar 27 at 14:49











  • Yes it is. But on clicking the button, it says webpage not found.

    – Anmol Khanna
    Mar 27 at 14:50











  • Wild guess but if you want both, couldn't you make two separate methods, with different RequestMappings, and one also calls the other?

    – JustAFellowCoder
    Mar 27 at 14:54











  • I tried that, but it doesn't fetch me the details from the getData method. It will fetch me the data if called as a formaction I suppose.

    – Anmol Khanna
    Mar 27 at 14:57











  • Not sure if it matters the order, but isn't method supposed to be after params?

    – JustAFellowCoder
    Mar 27 at 15:05

















  • Is it compiling?

    – JustAFellowCoder
    Mar 27 at 14:49











  • Yes it is. But on clicking the button, it says webpage not found.

    – Anmol Khanna
    Mar 27 at 14:50











  • Wild guess but if you want both, couldn't you make two separate methods, with different RequestMappings, and one also calls the other?

    – JustAFellowCoder
    Mar 27 at 14:54











  • I tried that, but it doesn't fetch me the details from the getData method. It will fetch me the data if called as a formaction I suppose.

    – Anmol Khanna
    Mar 27 at 14:57











  • Not sure if it matters the order, but isn't method supposed to be after params?

    – JustAFellowCoder
    Mar 27 at 15:05
















Is it compiling?

– JustAFellowCoder
Mar 27 at 14:49





Is it compiling?

– JustAFellowCoder
Mar 27 at 14:49













Yes it is. But on clicking the button, it says webpage not found.

– Anmol Khanna
Mar 27 at 14:50





Yes it is. But on clicking the button, it says webpage not found.

– Anmol Khanna
Mar 27 at 14:50













Wild guess but if you want both, couldn't you make two separate methods, with different RequestMappings, and one also calls the other?

– JustAFellowCoder
Mar 27 at 14:54





Wild guess but if you want both, couldn't you make two separate methods, with different RequestMappings, and one also calls the other?

– JustAFellowCoder
Mar 27 at 14:54













I tried that, but it doesn't fetch me the details from the getData method. It will fetch me the data if called as a formaction I suppose.

– Anmol Khanna
Mar 27 at 14:57





I tried that, but it doesn't fetch me the details from the getData method. It will fetch me the data if called as a formaction I suppose.

– Anmol Khanna
Mar 27 at 14:57













Not sure if it matters the order, but isn't method supposed to be after params?

– JustAFellowCoder
Mar 27 at 15:05





Not sure if it matters the order, but isn't method supposed to be after params?

– JustAFellowCoder
Mar 27 at 15:05












0






active

oldest

votes










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55380052%2fusing-request-method-get-and-params-formaction-together-in-a-single-method%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes




Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55380052%2fusing-request-method-get-and-params-formaction-together-in-a-single-method%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현