The following servlet reads the url path parameter.
Problem: if the input contains special chars, eg I discovered #
, then the string is truncated!
@RestController
public class MyServlet {
@GetMapping("/hash")
@ApiIgnore
public String hash(HttpServletRequest req) {
String pw = req.getPathInfo(); //asdfgh
}
}
`localhost:8080/hash/asdfgh#jkl`
Question: how can I natively pass through the input parameter?