Sample code for 30+ languages & platforms
Java

Example: Http.GetUrlPath method

Demonstrates the GetUrlPath method.

Chilkat Java Downloads

Chilkat2 Java
import com.chilkatsoft.chilkat2.Http;

public class ChilkatExample {

    public static void main(String[] args) {
        Http http = new Http();
        String url = "https://example.com/folder/page?lang=en&sort=asc#section2";
        System.out.println(http.getUrlPath(url));

        // Output:

        // /folder/page
    }
}