Url Rewrite Filter 310 ManualWord文档下载推荐.docx

上传人:b****2 文档编号:15377483 上传时间:2022-10-29 格式:DOCX 页数:20 大小:25.43KB
下载 相关 举报
Url Rewrite Filter 310 ManualWord文档下载推荐.docx_第1页
第1页 / 共20页
Url Rewrite Filter 310 ManualWord文档下载推荐.docx_第2页
第2页 / 共20页
Url Rewrite Filter 310 ManualWord文档下载推荐.docx_第3页
第3页 / 共20页
Url Rewrite Filter 310 ManualWord文档下载推荐.docx_第4页
第4页 / 共20页
Url Rewrite Filter 310 ManualWord文档下载推荐.docx_第5页
第5页 / 共20页
点击查看更多>>
下载资源
资源描述

Url Rewrite Filter 310 ManualWord文档下载推荐.docx

《Url Rewrite Filter 310 ManualWord文档下载推荐.docx》由会员分享,可在线阅读,更多相关《Url Rewrite Filter 310 ManualWord文档下载推荐.docx(20页珍藏版)》请在冰豆网上搜索。

Url Rewrite Filter 310 ManualWord文档下载推荐.docx

4.<

filter>

5.<

filter-name>

UrlRewriteFilter<

/filter-name>

6.<

filter-class>

org.tuckey.web.filters.urlrewrite.UrlRewriteFilter<

/filter-class>

7.<

/filter>

8.<

filter-mapping>

9.<

10.<

url-pattern>

/*<

/url-pattern>

11.<

/filter-mapping>

12.AddyourownconfigurationtotheWEB-INF/urlrewrite.xmlthatwascreated.

13.Restartthecontext.

Youcanvisithttp:

//127.0.0.1:

8080/rewrite-status(orwhatevertheaddressofyourlocalwebappandcontext)toseeoutput(note:

thispageisonlyviewablefromlocalhost).

FilterParameters

Thereareafewadvancedfilterparametersforenablingconffilereloadingetc.Thereareself-explanatory.

<

!

--settheamountofsecondstheconffilewillbecheckedforreload

canbeavalidinteger(0denotescheckeverytime,

-1denotesnoreloadcheck,default-1)-->

init-param>

param-name>

confReloadCheckInterval<

/param-name>

param-value>

60<

/param-value>

/init-param>

--ifyouneedtotheconffilepathcanbechanged

itisspecifiedasapathrelativetotherootofyourcontext

(default/WEB-INF/urlrewrite.xml)-->

confPath<

/WEB-INF/urlrewrite.xml<

--setsuploglevel(willbeloggedtocontextlog)

canbe:

TRACE,DEBUG,INFO(default),WARN,ERROR,FATAL,log4j,commons,

sysout:

{level}(ie,sysout:

DEBUG)

ifyouarehavingtroubleusingnormallevelsusesysout:

DEBUG

(defaultWARN)-->

logLevel<

DEBUG<

--youcanchangestatuspathsothatitdoesnot

conflictwithyourinstalledapps(note,defaults

to/rewrite-status)note,muststartwith/-->

statusPath<

/status<

--youcandisablestatuspageifdesired

true,false(defaulttrue)-->

statusEnabled<

true<

--youmaywanttoallowmorehoststolookatthestatuspage

statusEnabledOnHostsisacommadelimitedlistofhosts,*can

beusedasawildcard(defaultsto"

localhost,local,127.0.0.1"

)-->

statusEnabledOnHosts<

localhost,dev.*,*<

--defaultstofalse.usemod_rewritestyleconfigurationfile(ifthisistrueandconfPath

isnotspecifiedconfPathwillbesetto/WEB-INF/.htaccess)-->

modRewriteConf<

false<

--loadmod_rewritestyleconfigurationfromthisparameter'

svalue.

note,Settingthisparameterwillmeanthatallotherconfparametersareignored.

modRewriteConfText<

RewriteRule^/~([^/]+)/?

(.*)/u/$1/$2[R]

RewriteRule^/([uge])/([^/]+)$/$1/$2/[R]

-->

Note,settinglogLeveltolog4jorcommonswillcausethebuiltinlogingtocalleitherlog4jorcommons-loggingasiftheyweretheloggingframework,obviouslyyouwillneedtohavethejarforlog4jorcommons-logginginyourclasspath.

ConfigurationFileWEB-INF/urlrewrite.xml

ConfigurationisdoneviaasimpleXMLfilethatlivesinyourWEB-INFfolder.Itshouldbenamedurlrewrite.xml.ItmaybehelpfultoreadtheUrlRewriteFilterDTD(DocumentTypeDefinition).Pleasealsomakesureyoulookattheexamples.Asimpleconfigurationfilelookslike:

?

xmlversion="

1.0"

encoding="

utf-8"

>

DOCTYPEur

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 医药卫生 > 基础医学

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1