What’s the best way to get the current URL in Spring MVC?

Well there are two methods to access this data easier, but the interface doesn’t offer the possibility to get the whole URL with one call. You have to build it manually: public static String makeUrl(HttpServletRequest request) { return request.getRequestURL().toString() + “?” + request.getQueryString(); } I don’t know about a way to do this with any … Read more

What is the difference between URL parameters and query strings?

The query component is indicated by the first ? in a URI. “Query string” might be a synonym (this term is not used in the URI standard). Some examples for HTTP URIs with query components: http://example.com/foo?bar http://example.com/foo/foo/foo?bar/bar/bar http://example.com/?bar http://example.com/?@bar._=???/1: http://example.com/?bar1=a&bar2=b (list of allowed characters in the query component) The “format” of the query component is … Read more

Characters allowed in a URL

EDIT: As @Jukka K. Korpela correctly points out, RFC 1738 was updated by RFC 3986. This has expanded and clarified the characters valid for host, unfortunately it’s not easily copied and pasted, but I’ll do my best. In first matched order: host = IP-literal / IPv4address / reg-name IP-literal = “[” ( IPv6address / IPvFuture … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)