Tutorial

URL Routing and Parameters

Master URL routing and parameter handling in Oorian applications.

M. WarbleAugust 13, 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.

Related Articles

Tutorial

Getting Started with Oorian: Your First Java Web Application

December 31, 2025
Security

Security by Default: How Oorian Protects Your Applications

January 11, 2026
Announcement

Why We Built Oorian: The Story Behind the Framework

January 7, 2026