public class UrlFilenameViewController extends AbstractUrlViewController
Controller 実装。 オプションで、prefix を付加したり、suffix を付加したりして、URL ファイル名からビュー名を作成できます。
以下の例をいくつか参照してください。
"/index" -> "index""/index.html" -> "index""/index.html" + 接頭辞 "pre_" および接尾辞 "_suf" -> "pre_index_suf""/products/view.html" -> "products/view"接頭辞 / 接尾辞のサポートを提案してくれた David Barri に感謝します!
setPrefix(java.lang.String), setSuffix(java.lang.String)HEADER_CACHE_CONTROL, METHOD_GET, METHOD_HEAD, METHOD_POSTlogger| コンストラクターと説明 |
|---|
UrlFilenameViewController() |
| 修飾子と型 | メソッドと説明 |
|---|---|
protected StringSE | extractOperableUrl(HttpServletRequestEE request) ビュー名の抽出に適した、指定されたリクエストから URL パスを抽出します。 |
protected StringSE | extractViewNameFromUrlPath(StringSE uri) 指定されたリクエスト URI から URL ファイル名を抽出します。 |
protected StringSE | getPrefix() リクエスト URL ファイル名の前に付けるプレフィックスを返します。 |
protected StringSE | getSuffix() リクエスト URL ファイル名に追加するサフィックスを返します。 |
protected StringSE | getViewNameForRequest(HttpServletRequestEE request)URL ファイル名に基づいてビュー名を返します。適切な場合は、プレフィックス / サフィックスが適用されます。 |
protected StringSE | getViewNameForUrlPath(StringSE uri)URL ファイル名に基づいてビュー名を返します。適切な場合は、プレフィックス / サフィックスが適用されます。 |
protected StringSE | postProcessViewName(StringSE viewName)URL パスで示されるように、指定されたビュー名に基づいて完全なビュー名を作成します。 |
void | setPrefix(StringSE prefix) ビュー名を作成するには、リクエスト URL ファイル名の前に付加するプレフィックスを設定します。 |
void | setSuffix(StringSE suffix) ビュー名を作成するために、リクエスト URL ファイル名に追加するサフィックスを設定します。 |
getUrlPathHelper, handleRequestInternal, setAlwaysUseFullPath, setRemoveSemicolonContent, setUrlDecode, setUrlPathHelperhandleRequest, isSynchronizeOnSession, setSynchronizeOnSessionapplyCacheControl, applyCacheSeconds, applyCacheSeconds, cacheForSeconds, cacheForSeconds, checkAndPrepare, checkAndPrepare, checkRequest, getAllowHeader, getCacheControl, getCacheSeconds, getSupportedMethods, getVaryByRequestHeaders, isAlwaysMustRevalidate, isRequireSession, isUseCacheControlHeader, isUseCacheControlNoStore, isUseExpiresHeader, prepareResponse, preventCaching, setAlwaysMustRevalidate, setCacheControl, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseCacheControlNoStore, setUseExpiresHeader, setVaryByRequestHeadersgetServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContextgetApplicationContext, getMessageSourceAccessor, initApplicationContext, obtainApplicationContext, requiredContextClass, setApplicationContextcloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSEpublic void setPrefix(@Nullable StringSE prefix)
protected StringSE getPrefix()
public void setSuffix(@Nullable StringSE suffix)
protected StringSE getSuffix()
protected StringSE getViewNameForRequest(HttpServletRequestEE request)
AbstractUrlViewController の getViewNameForRequest request - 現在の HTTP リクエスト null)extractViewNameFromUrlPath(java.lang.String), setPrefix(java.lang.String), setSuffix(java.lang.String)protected StringSE extractOperableUrl(HttpServletRequestEE request)
request - 現在の HTTP リクエスト protected StringSE getViewNameForUrlPath(StringSE uri)
uri - リクエスト URI; たとえば "/index.html""index"extractViewNameFromUrlPath(java.lang.String), postProcessViewName(java.lang.String)protected StringSE extractViewNameFromUrlPath(StringSE uri)
uri - リクエスト URI; たとえば "/index.html""index"protected StringSE postProcessViewName(StringSE viewName)
デフォルトの実装では、単に接頭辞と接尾辞が適用されます。これは、たとえば、大文字 / 小文字などを操作するためにオーバーライドできます。
viewName - URL パスで示される元のビュー名 getPrefix(), getSuffix()