Is there any way I can tell if there is a trailing question mark in a URL? This would theoretically be an empty non null query string while no question mark at all would be a null query string. But either way, my web app is getting request.getQueryString() == null
.
Take the 2-minute tour
×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
|
|||
|
|
|||||||||||||||||||||
|
How about something like this:-
I could be wrong, but if the request is a GET and it has parameters, then I think we can safely assume there is a trailing question mark after the URI. UPDATE I just tested the code, this approach works only if you have parameters: |
|||||||||||||||||
|