Questions tagged [http-request-parameters]

The parameters that are mapped to the servlet request when they are parsed from the http request.

The parameters that are mapped to the servlet request when they are parsed from the http request. These parameters represent a query string when a method GET is used and a body of the request if a method POST is used.

276 questions
0
votes
0 answers

MissingServletRequestParameterException but it is present

I'm trying to call Spring Controller from JS with a requesParam but I'm always getting Required String parameter 'id' is not present The call in my JSP: window.location.href='controllerTest/controller1/function1?id='+idFromJSFunction; My…
canillas
  • 414
  • 3
  • 13
0
votes
1 answer

HTTP request with conditional date parameter in angular-in-memory-web-api

I have an array of objects called members members = [ {id:'1', firstName:'John', lastName:'Black', birthDate:'1956-11-22', gender:'Male', email:'johnblack@gmail.com', phone:'806-555-1234'} {id:'2', firstName:'Josh', lastName:'Black',…
0
votes
0 answers

Issue with optional request param in POST method

I have a POST API as below: @POST @Path("/api/analysis/s3file/{filename}") @Produces("application/json") public Response analysis(@PathParam("filename") String filename, @RequestParam(value = "errorDesc", required = false, defaultValue ="true")…
0
votes
1 answer

How to display customized error response in REST API

My url is http://localhost:8090/employee/?emp_id=1551&name= I am using Spring boot for designing REST application. I have used @RequestMapping and @RequestParam annotation for get resource. When I pass empty value to request parameter (for eg. name…
0
votes
1 answer

Spring Validation for multiple @RequestParam

Suppose I have a RestController for a @GetMapping as below ResponseEntity getXXX( @RequestParam(value = "param1", required = true) String param1, @RequestParam(value = "param2", required = true) String param1) if consumer performs @Get for this…
Nghia Do
  • 2,588
  • 2
  • 17
  • 31
0
votes
1 answer

send file to another page requestparam can not find localhost error

I want to send a picture to another page and see what happen but when I put @RequestParam Map map it can not find the local page.
kong kim
  • 29
  • 1
  • 4
0
votes
2 answers

Getting FileUploadException: the request was rejected because no multipart boundary was found in Controller while posting File from Angular 2

I have Controller Method as below : @RequestMapping(method = RequestMethod.POST, consumes = "multipart/form-data", produces = "application/json") public void saveUpdate(@RequestPart("org") Organization org, @RequestPart("logo")…
0
votes
0 answers

Spring MVC How to give default dates in GET HTTP Request in my controller method?

How to give start date as System.currentTimeMillis() for default value in the request param for my controller method? Since this is a variable (requires constant), is there any other way to set this as default value? Like this: @RequestParam(value =…
Milee
  • 1,191
  • 1
  • 11
  • 29
0
votes
1 answer

how to call httpconeection setRequestProperty android in loop to setHeader?

HTTPConnection conn method setRequestProperty conn.setRequestProperty("",""); I have different header for different URL. So, it's not fix in my project. I need to use a array to fill the setRequestproperty data. Individual call for…
0
votes
1 answer

Spring request params to accept only Integers

I am working on an spring restful endpoint which accepts page range(start & end page number). I want my request params- pageStart and pageEnd to accept only integers. When I pass 'pageStart = a' through postman I get below error: …
Deepa
  • 41
  • 1
  • 9
0
votes
1 answer

AsyncHttpClient RequestParams not follow sequence

My Code as below with call post method: RequestParams reqParams = new RequestParams(); reqParams.put("name", title); reqParams.put("date", date); reqParams.put("description", description); reqParams.put("status", status); File file…
micky
  • 235
  • 2
  • 4
  • 16
0
votes
2 answers

How to extract request parameter into name value collection

I have a request parameter like usrInfo:fname=firstname&lname=lastname&company=&addressLine1=wewqe&addressLine2=wqewqe&city=qweqwe&country=United+States I want to extract values for each name. I have written below method but it is failing when…
Kali
  • 21
  • 1
  • 6
0
votes
0 answers

How to preset value of with a GET parameter? The f:param in h:inputText does not seem to work

I have a GET form on which I need to preset the value of an to a request parameter. I tried using inside . Search
user5758156
0
votes
0 answers

How to let Spring MVC decode multi-valued request parameters with incorrect [] suffix?

When jQuery.ajax({ ... data: { search: {input : 'value'} array : [1,2] } } The method will request the url: url?search[input]=value&array[]=1&array[]=2 which follows the application/x-www-form-urlencoded…
mjs
  • 21,431
  • 31
  • 118
  • 200
0
votes
0 answers

Ajax Request Sending Multiple Items/Javascript Object to Java

At first I was sending data over as one singular object like so: function ajaxCall(){ $.ajax({ url: "someURL", data: data, type: "POST", dataType: "json", //more…
REAL O G
  • 693
  • 7
  • 23