springmvc web jsp Web-Return

码农软件 · 软件分类 · 网页开发工具 · 2019-03-20 23:29:11

软件介绍

spring后台会在过滤器里会自动拼接urlParent和currentUrlDecode参数

jsp页面编码时:

1,在父页面跳转打开子页面的URL,需要带上参数: urlParent=${currentUrlDecode}
2,子页面返回按钮的js代码统一使用: window.location.href = "${basePath}/"+"${urlParent}";   其中basePath为${pageContext.request.contextPath} 例如   function  pageBack(){    window.location.href = "${basePath}/"+"${urlParent}";   }

配置步骤:

1,将web-return-0.0.1-SNAPSHOT.jar加载到项目里。

2,修改web.xml,加入如下filter配置:

<filter>
		<filter-name>returnFilter</filter-name>
		<filter-class>com.bacel.returns.filter.ReturnFilter</filter-class>
		<init-param>
			<!-- 例外的页面路径,因计算currentUrlDecode耗时,例外的路径可以不用处理-->
			<param-name>excludedPages</param-name>
			<param-value>resources/,persons/login/,persons/register/</param-value>
		</init-param>
		<init-param>
			<!-- 如果session属性sessionString值,非空则支持回退;此处支持扩展支持仅仅登录后才能回退-->
			<param-name>sessionString</param-name>
			<param-value></param-value>
		</init-param>
	</filter>
	<filter-mapping>
		<filter-name>returnFilter</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>


谢谢大家,如果有新构思,请及时分享.

本文地址:https://codercto.com/soft/d/1801.html

Head First Design Patterns

Head First Design Patterns

Elisabeth Freeman、Eric Freeman、Bert Bates、Kathy Sierra、Elisabeth Robson / O'Reilly Media / 2004-11-1 / USD 49.99

You're not alone. At any given moment, somewhere in the world someone struggles with the same software design problems you have. You know you don't want to reinvent the wheel (or worse, a flat tire),......一起来看看 《Head First Design Patterns》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

MD5 加密
MD5 加密

MD5 加密工具