---
title: "weblogic 12 && struts2"
author: "guanshuiwang"
date: "2012-03-29T10:56:00Z"
tags: []
slug: "weblogic-12-struts2"
draft: false
lastmod: "2012-09-21T16:21:49Z"
id: 1683100
url: "https://guanshuiwang.iteye.com/blog/1683100"
---

Struts Action mapping问题请参考以下内容：

Struts2.18以后版本在Weblogic12c上关于Action注解的运行调整。   
  weblogic12c在加载项目时会把WEB-INF下的classes目录打成jar包。并删除classes目录下的内容。   
  struts2.18的Action注解要找jar包，需要jar包内有META-INF/Manifest文件，内容无所谓但要有，因此会造成一般的 struts项目放到Webligic上后注解半不生效。改动在src目录下添加META-INF/Manifest文件，在struts.xml添加如 下设置：

&lt;constant name="struts.convention.action.includeJars" value=".\*\_wl\_cls\_gen.\*"/&gt;  
&lt;constant name="struts.convention.action.fileProtocols" value="jar,zip" /&gt;