Weblogic 11g JSP cache

Normally,  jsp_servlet classes will be cached by Weblogic 11g in:

{BEA_WLS}\user_projects\domains\yourdomain\servers\yourserver\tmp\_WL_user\your_app_name

 

We always meet a strange problem: why JSP page is not up to date even after restart/redeploy application? This is mainly because the cache is not cleared.

Two solutions to solve this problem:

  1. Clean your domain/cache before redeploy.
  2. Define "jsp-descriptor" in webloigc.xml to ask weblogic precompile all modified JSPs when the Web application is deployed or re-deployed or when starting WebLogic Server
Here, I list some jsp-param which can help us to debug issues in JSP development with Weblogic server:
  • keepgenerated: true|false: Saves the Java files that are generated as an intermediary step in the JSP compilation process. Unless this parameter is set to true, the intermediate Java files are deleted after they are compiled.
  • precompile: true|false: When set to true, WebLogic Server continues precompiling all modified JSPs even if some of those JSPs fail during compilation. Only takes effect when precompile is set to true.
  • precompile-continue: true|false: When set to true, WebLogic Server automatically precompiles all modified JSPs when the Web application is deployed or re-deployed or when starting WebLogic Server.
Here is a demo of weblogic.xml:
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app>
  	<jsp-descriptor>
		<jsp-param>
			<!-- keepgenerated=true: Used to save generated jsp_servlet java class for JSP file. It will be used to debug jsp error. -->
			<param-name>keepgenerated</param-name>
			<param-value>false</param-value>
		</jsp-param>
		<jsp-param>
			<param-name>precompile</param-name>
			<param-value>true</param-value>
		</jsp-param>
		<jsp-param>
			<param-name>precompile-continue</param-name>
			<param-value>true</param-value>
		</jsp-param>
	</jsp-descriptor>
</weblogic-web-app>
 
For more details on weblogic jsp-descriptor, please refer to  weblogic.xml Deployment Descriptor Elements.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值