-
Notifications
You must be signed in to change notification settings - Fork 0
Mapping Requests to your Controller
In this section you will learn how to map different types of request URIs to your request handlers. Whether you are dealing with RESTful type URIs, dynamic URIs with parameters or plain URIs, geeMVC can deal with all these cases. And if you need some very special routing you can even use Javascript, Groovy or MVEL to dynamically map your request handler. Later on we will also show you how to map your request handler depending on cookie, header, http-method or the content-type (application/json, application/xml, ...).
Here are some URI examples that geeMVC can handle:
Plain URIs
/hello/world
/hello-world.html
/home
/index.html
/some/plain/uri
URIs with Parameters
/product/view?productId=12345
/product/view/12345
/delete-product/?id=12345
/product/update/12345
/category/view/12345?sortBy=name
/category/view/12345?sortBy=name&page=3
/category/view/12345/3?sortBy=name
RESTful type URIs
GET /api/v1/products
GET /api/v1/products?offset=40&limit=20
GET /api/v1/products/12345
POST /api/v1/products/12345
PUT /api/v1/products/12345
DELETE /api/v1/products/12345
Find out in the next section how you can register your controller with the @Controller annotation and then how to map your requests with the @Request annotation.
- User's Guide
- Motivation
- Prerequisites
- Getting Started
- Mapping Requests to your Controller
- Binding Parameters to your Handler Method
- Binding a Bean to your Handler Method
- Validating Incoming Parameters
- Sending a Response to the Client
- Internationalization (i18n)
- Working with Forms
- Mapping a Form to a Request Handler
- Using Geemvc Taglibs
- Displaying Form Errors and Notices.
- Creating a Standard Reusable Layout for your Website
- Working with Interceptors
- The Around Interceptor
- The Lifecycle Interceptor
- Customizing geeMVC
- Overriding geeMVC Classes
- Implementing your own Reflections Object
- Providing a Custom Injector
- Providing your own Caching Implementation
- Providing your own Logging Implementation
- Adding a custom Handler Resolver
- Adding a custom Binding Converter
- Adding your own Parameter Annotation
- Adding your own Validation Annotation
- Providing a custom View Adapter
- Implementing your own Script Evaluator
- Working with Eclipse
- General