WebSphere对JSP的缓存

本文介绍了解决WebSphere应用服务器中JSP更新后页面显示不刷新的问题。通过定位到服务器的temp目录并清除相关节点和服务下的编译后的JSP文件(.class),可以有效解决JSP缓存导致的显示问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

      对于线网上的工程,更新JSP到WebSphere后,有时会出现修改的jsp没有起作用,特别是改变了某jsp的样式后,在页面中没看到效果,这主要就是由于websphere中缓存的缘故,这就要清除WebSphere中jsp缓存。要清除WebSphere中JSP的缓存,就要找到WAS安装后的根目录。

       现服务器上WAS安装情况:

[was@HA5-WT02 web-g1-pf2]$ pwd

/home/was/web_web/web-g1-pf2

[was@HA5-WT02 web-g1-pf2]$ ls

bin     configuration  etc         installableApps  installedConnectors  logs        temp     wstemp

config  D:             firststeps  installedApps    installedFilters     properties  tranlog

 

找到temp目录,进去!

 

[was@HA5-WT02 web-g1-pf2]$ cd temp

[was@HA5-WT02 temp]$ ls

osgi_instance_location  sas.client.props  sas.stdclient.properties  sas.tools.properties  soap.client.props  ssl.client.props  web-g1-node2

 

进入节点目录 web-g1-node2 下:

cd web-g1-node2/

[was@HA5-WT02 web-g1-node2]$ ls

web-g1-node2-srv1  web-g1-node2-srv2  web-g1-node2-srv3  web-g1-node2-srv4

 

该节点下面有四个服务Server。

 

如果更新了原工程下一JSP,比如:

[was@HA5-WT02 e100_fee]$ pwd

/home/was/web_web/web-g1-pf2/installedApps/web-g1-dmgr-cell/MAIN_WEB.ear/main.war/act/e100_fee

[was@HA5-WT02 e100_fee]$ ls

common  css  images  in.jsp  in.jspBAK  Scripts

 

比如更新了 in.jsp 这个文件,可页面没有生效!

 

那就可以进入相应的编译过的目录下找到该文件:

[was@HA5-WT02 e100_fee]$ pwd

/home/was/web_web/web-g1-pf2/temp/web-g1-node2/web-g1-node2-srv1/MAIN_WEB/main.war/act/e100_fee

[was@HA5-WT02 e100_fee]$ ls

common  _in.class  _jfjl.class  _ysdh.class

 

删除下面的_in.class 文件。就像上面看到的一样,一个节点下有四个服务,那需要去删除四个服务里编译过的文件。

 

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值