weblogic上struts1热部署报错ClassCastException
只要修改了类文件必须从新部署,不然会报这错误
java.lang.ClassCastException: org.apache.struts.action.RequestProcessor cannot be cast to org.apache.struts.action.RequestProcessor
at org.apache.struts.action.ActionServlet.getRequestProcessor(ActionServlet.java:855)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
网上有解决方案修改weblogic.xml
<%@ page language="java" import="java.util.*" p
ageEncoding="GBK"%>
<?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>true</prefer-web-inf-classes>
<!-- 只要设置这个标签为true,就可以让WEB-INF里的类先被load到了-->
</container-descriptor>
<context-root>/</context-root>
</weblogic-web-app>