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
3
votes
5 answers

How to send json data in url as request parameters in java

I want to send json data in url as below . editTest.jsp?details=374889331-{"aNumber":2} How can I do this?
Sanjaya Liyanage
  • 4,706
  • 9
  • 36
  • 50
3
votes
1 answer

spring roo/spring mvc: how can i set uriencoding for controller method

i have a spring roo webapplication running in tomcat 7. there i have a spring roo generated controller method, that i pushed in for debugging issues: @RequestMapping(params = "find=ByFirstNameEqualsAndLastNameEquals", method =…
tom
  • 53
  • 7
3
votes
2 answers

How to get a form parameter in servlet? request.getAttribute does not work

Is it possible to have the same servlet perform validation? It seems that one might have to utilize some sort of recursion here, but when I type in something in the e-mail box and click submit the e-mail parameter is still blank. After I click…
Kiril
  • 39,672
  • 31
  • 167
  • 226
3
votes
1 answer

Redirect JSF ajax request to an URL with request parameters in a servlet filter

I am using JSF2.2 and have servlet filter configured. Part of the code in Filter that work: HttpServletResponse response = (HttpServletResponse) resp; if (userSession == null) { redirectURLRegular =…
Helija
  • 133
  • 2
  • 9
3
votes
1 answer

Retrieving parameters from request ASP Classic 3.0

Is there a problem or difference between retrieving the request parameter as follows: Request("") Instead of: Request.Form("") or Request.QueryString("") ? Thanks in advance!
EProgrammerNotFound
  • 2,403
  • 4
  • 28
  • 59
3
votes
1 answer

How to get non english words in Java?

I am passing இயற்பியல் in subject name from Javascript to Java, while using alert in javascript. alert(subject name); இயற்பியல் is shown, whereas if I get value of subject name using String subname=request.getParameter("subject…
Matrix
  • 83
  • 1
  • 1
  • 7
2
votes
0 answers

Spring Controller request parameter wrong encoding in one instance of Tomcat but not the others

I have a Spring MVC application which works fine in eclipse (local tomcat instance) and in a test environment where tomcat is installed as a service. But when I deploy the application in production the request parameters are not parsed correctly…
alex
  • 705
  • 9
  • 21
2
votes
3 answers

How to have filtering of multiple parameters passed as RequestParams in Spring Data Jpa?

Suppose I have an Employee class with multiple fields like name, age, salary, designation, joiningDate, gender and many more. Now, how could I apply filtering with many such parameters? There could be many combinations possible in such cases. (For…
2
votes
1 answer

Is possible to use LocalDateTime as a RequestParam in Kotlin?

I'm learning Kotlin, doing a simple API Rest with Spring Boot. My problem is that I'm trying to use LocalDateTime as @RequestParam but it just not working as it does in Java. This is my code: import…
2
votes
2 answers

How to get query string without equal sign using SpringBoot?

We know @RequestParam is a good way to get query parameters like "?name=Tom" for example: www.example.com/?name=Tom and you can use @RequestParam(value="name") String name to get the key "name". But how to get the query string without equal sign…
Jun
  • 31
  • 3
2
votes
1 answer

Spring Controller: bind query parameters to custom POJO fields

I'm trying to map certain values from request query parameters to POJO parameters as the following. This is the POJO: import lombok.*; import org.springframework.format.annotation.DateTimeFormat; import javax.validation.constraints.Min; import…
m.y.m
  • 347
  • 4
  • 27
2
votes
1 answer

How to use a custom deserializer with Spring @RequestParam

I have an interface that's not aware of its implementations (module-wise): public interface SomeInterface { } and an enum implementing it: public enum SomeInterfaceImpl { } I have a @RestController: @RequestMapping(method =…
2
votes
3 answers

@RequestParam with any value

I have the following metod in my @Restcontroller: @GetMapping public List getByParameterOrAll( @RequestParam(value = "email", required = false) String email, @RequestParam(value = "phone", required = false) String phone) { …
Jelly
  • 972
  • 1
  • 17
  • 40
2
votes
4 answers

Spring REST API register date converter for pojo

Spring rest provides building pojo functionality by default from path variables and url parameters. In my case I have pojo: public class MyCriteria { private String from; private String till; private Long communityNumber; private String…
Sergii
  • 7,044
  • 14
  • 58
  • 116
2
votes
2 answers

can't apply custom validation to requestParam

I have my RequestParam and I need to validate it, but mu custom validation don't apply, my controller @RestController @Validated class ExchangeController { private static final Logger logger =…