---
title: "[转]在Websphere上修改项目的web.xml"
author: "xiaochuan225"
date: "2010-07-22T15:25:23Z"
tags: []
categories: ["企业架构"]
slug: "websphere-web-xml"
draft: false
lastmod: "2010-07-22T15:25:23Z"
id: 718968
url: "https://nicyea.iteye.com/blog/718968"
---

在websphere下部署了一个java工程后，如果修改了web.xml文件，重新启动这个java工程发现websphere并没有自动加载web.xml文件，即修改后的web.xml并不起作用，除非重新把这个java工程再部署

一次，这需要花一些时间，如果是远程操作机器，上传整个jar包也是很慢的事情。

 其实这是因为websphere下的配置文件通常有两份，一份在installedApps下，另一份在

config下面，所以需要修改两个地方的web.xml文件后才能起效。这里以websphere6为例，两份配置文件的详细路径一般为

1、/opt/IBM/WebSphere/profiles/AppSrv01/installedApps/coshineNode01Cell/unscard.ear

其中coshineNode01Cell这个是机器名，unscard.ear为项目名

2、/opt/IBM/WebSphere/profiles/AppSrv01/config/cells/coshineNode01Cell/applications/unscard.ear

只要修改这两处的web.xml文件，就可以生效了。