Top Description Methods
org.springframework.web.servlet

public Interface RequestToViewNameTranslator

Known Direct Implementers
org.springframework.web.servlet.view.DefaultRequestToViewNameTranslator
Imports
jakarta.servlet.http.HttpServletRequest, org.springframework.lang.Nullable

Strategy interface for translating an incoming jakarta.servlet.http.HttpServletRequest into a logical view name when no view name is explicitly supplied.
Authors
Rob Harrop, Juergen Hoeller
Since
2.0

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the view name, or null if no default found
getViewName
(HttpServletRequest
the incoming HttpServletRequest providing the context from which a view name is to be resolved
request
)

Translate the given HttpServletRequest into a view name.

Method Detail

getViewNameback to summary
public String getViewName(HttpServletRequest request) throws Exception

Translate the given HttpServletRequest into a view name.

Parameters
request:HttpServletRequest

the incoming HttpServletRequest providing the context from which a view name is to be resolved

Returns:String

the view name, or null if no default found

Annotations
@Nullable
Exceptions
Exception:
if view name translation fails