Tutorial

URL Routing and Parameters

Master URL routing and parameter handling in Oorian applications.

M. WarbleMarch 24, 20261 min read
URL Routing and Parameters

Clean, bookmarkable URLs are essential for modern web applications. Oorian provides full support for URL routing and parameters.

Basic Routing

@Page("/customers")
public class CustomerListPage extends HtmlPage { }

@Page("/customers/{id}")
public class CustomerDetailPage extends HtmlPage
{
    @Override
    protected void createBody(Body body)
    {
        String customerId = getUrlParameter("id");
        Customer customer = customerService.findById(customerId);
        // Display customer details
    }
}

Query Parameters

// URL: /search?q=java&category=books
String query = getQueryParameter("q");  // "java"
String category = getQueryParameter("category");  // "books"

Navigating Programmatically

// Navigate to another page
navigateTo("/customers/" + customerId);

// With query parameters
navigateTo("/search?q=" + URLEncoder.encode(query, "UTF-8"));

Conclusion

Oorian's routing system enables clean, RESTful URLs that are bookmarkable and shareable.

Share this article

Related Articles

Tutorial

Oorian's Built-In Accessibility Features

January 19, 2026
Tutorial

Getting Started with Oorian: Your First Java Web Application

December 31, 2025
Deep Dive

Logging and Error Handling in Oorian: A Complete Guide

February 24, 2026