本文介绍了基于内部文本更新XML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

- >

- < web-app xmlns =http://java.sun.com/xml/ns/javaeexmlns:xsi =http://www.w3.org/2001/ XMLSchema-instancexsi:schemalocation =http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsdversion =2.5 >

- <! - 此Spring网络应用程序的主配置文件

- >



- <! - SSO过滤开始

- >

- < filter>

< filter-name> CAS过滤器

< filter-class> com.csc.fsg.pcdSecurity .filter.CASFilter

- < init-param>

< param-name> edu.yale.its.tp.cas.client.filter.loginUrl

- <! - 登录网址

- >

< param-value> http://20.15.81.224:9080 / sso / login

- <! - 负载均衡登录的URL

- >



- <! - 辅助服务器支持 - 开始

- >

- < init-param>

< param-name> com.csc.fsg.pcidsecurity.filter.secServerParamName

< PARAM值>



- < init-param>

< param-name> com.csc.fsg.pcidsecurity.filter.loginUrl2

< param-value> http:// COMPNAME2:8080 / CONTEXTNAME2 / login



- <! - 辅助服务器支持 - 结束

- >

- <! - < init-param>

< param-name> xmltag

< param-value> user





- >

- < init-param>

< param-name> com.csc.fsg.pcidsecurity.logoutUrl

- <! - 退出网址

- >

< param-value> http://20.15.81.224:9080 / sso / logout



- < init-param>

< param-name> com.csc.fsg.pcidsecurity.inactivityTimeout

- <! - 非活动超时值(秒)

- >

< param-value> 7200













我必须更新20.15.81.224:9080值

值与用户输入的值但问题是这个每当我再次生成这个xml这个值变得不同像10.10.81.224:9081这是服务器的ip地址,其中部署的应用程序我无法在搜索标准中对此值进行硬编码,即使我无法搜索<< param-value>它除了url之外还可以有不同的值

pleae帮助用用户输入的值更新此值

-->
- <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
- <!-- The master configuration file for this Spring web application
-->

- <!-- SSO Filter Start
-->
- <filter>
<filter-name>CAS Filter
<filter-class>com.csc.fsg.pcdSecurity.filter.CASFilter
- <init-param>
<param-name>edu.yale.its.tp.cas.client.filter.loginUrl
- <!-- URL for login
-->
<param-value>http://20.15.81.224:9080/sso/login
- <!-- URL for load balancing login
-->

- <!-- Secondary Server Support - Start
-->
- <init-param>
<param-name>com.csc.fsg.pcidsecurity.filter.secServerParamName
<param-value>

- <init-param>
<param-name>com.csc.fsg.pcidsecurity.filter.loginUrl2
<param-value>http://COMPNAME2:8080/CONTEXTNAME2/login

- <!-- Secondary Server Support - End
-->
- <!-- <init-param>
<param-name>xmltag
<param-value>user


-->
- <init-param>
<param-name>com.csc.fsg.pcidsecurity.logoutUrl
- <!-- URL for logout
-->
<param-value>http://20.15.81.224:9080/sso/logout

- <init-param>
<param-name>com.csc.fsg.pcidsecurity.inactivityTimeout
- <!-- Inactivity timeout value in seconds
-->
<param-value>7200






I have to update 20.15.81.224:9080 value
value with user entered value but problem is this whenever i generate this xml again this value become different like 10.10.81.224:9081 this is the ip address of server where application deployed i cannot hardcode this value in search crirtia even i cannot search on <<param-value> it can have different value also other than url
pleae help to update this value with user enetered value

推荐答案



这篇关于基于内部文本更新XML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-26 22:02