Weblogic8.1热部署问题的解决

在weblogic中可以成功的部署应用,可以打包ear,也可以以复制文件夹的形式

当我们修改jsp或class文件的时候必须要重启weblogic才能将效果在应用中显示出来,这样在开发过程中只要有一点改动就要重启服务器, 导致陷入了改动-重启-部署的一个冗长的过程,在开发过程中可以以分散的形式来部署ear或者war,

其实这些都可以通过配置解决,修改weblogic.xml,留意下面配置文件的注释:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN" "http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd">

<weblogic-web-app>

<jsp-descriptor>
    <jsp-param>
      <param-name>compileFlags</param-name>
      <param-value>-g</param-value>
    </jsp-param>
    <jsp-param>
      <param-name>keepgenerated</param-name>
      <param-value>true</param-value>
    </jsp-param>
    <jsp-param>
      <param-name>pageCheckSeconds</param-name>
<!--   
用来控制检查页面的频率时间,为-1时不检查

正数时,对于jsp页面的改动服务器能马上认出来
-->
      <param-value>5</param-value>
    </jsp-param>
  </jsp-descriptor>

<container-descriptor>
<!--
-1时对servlet类的改动能认出并自动更新部署,
正数时,对Class类的改动就抛出以下异常
-->
<servlet-reload-check-secs>-1</servlet-reload-check-secs>

<prefer-web-inf-classes>false</prefer-web-inf-classes>

</container-descriptor>

<context-root>managerWeb</context-root>

</weblogic-web-app>




======================   buckup=============

    <wls:jsp-descriptor>
        <wls:keepgenerated>true </wls:keepgenerated>
        <wls:package-prefix>jsp_servlet </wls:package-prefix>
        <wls:page-check-seconds>1 </wls:page-check-seconds>
        <wls:precompile>false </wls:precompile>
        <wls:verbose>true </wls:verbose>
        <wls:working-dir>../ms_temp_jsp </wls:working-dir>
        <wls:print-nulls>false </wls:print-nulls>
        <wls:backward-compatible>true </wls:backward-compatible>
        <wls:encoding>UTF8 </wls:encoding>
        <wls:debug>true </wls:debug>
    </wls:jsp-descriptor>
   
    <wls:container-descriptor>
        <wls:servlet-reload-check-secs>0 </wls:servlet-reload-check-secs>
        <wls:resource-reload-check-secs>0 </wls:resource-reload-check-secs>
        <wls:save-sessions-enabled>false </wls:save-sessions-enabled>
        <wls:prefer-web-inf-classes>true </wls:prefer-web-inf-classes>
    </wls:container-descriptor>

你可能感兴趣的:(jsp,应用服务器,Web,weblogic,servlet)