Posted on 2007-09-18 11:04
在路上... 閱讀(1801)
評論(2) 編輯 收藏 所屬分類:
JAVA相關
在這里可以下載Resin Plugin for IntelliJ IDEA ,但是對于3.1X好像還不支持。http://plugins.intellij.net/plugin/?id=215
作者更新太慢,不好意思自己動手反編譯修改了幾個地方,現在可以支持Resin Pro 3.1.2,如果需要地可以從這里
* 下載:Resin_2640_31.zip
* 安裝:
修改文件名為Resin_2640_31.jar,復制到C:\Documents and Settings\[username]\.IntelliJIdea60\config\plugins下面
* 修改記錄
1、將3.1.2的resin.conf文件命名為resin31.conf加到org\intellij\j2ee\web\resin\resin下面
2、將ResinVersion.java修改為如下方法判斷是否3.1版本

public static final ResinVersion VERSION_3_X = new ResinVersion("Resin 3.x")
{

public boolean isOfVersion(File file)

{
return (new File(new File(file, "lib"), "jsdk-15.jar")).exists();
}

public String getStartupClass()

{
return "com.caucho.server.resin.Resin";
}

}
3、修改Resin3XConfigurationStrategy.java文件中部分判斷http port、host的代碼
原來的XML節點為root->server->host->http->port and root->server->host->web-app
3.1下面的XML節點為root->cluster->server-default->http->port and root->cluster->host->web-app
改過的代碼為
Element httpElement = document.getRootElement().getChild("cluster", ns).getChild("server-default", ns).getChild("http", ns);
Element host = getHost(document.getRootElement().getChild("cluster", ns), ns, webApp);
List hosts = document.getRootElement().getChild("cluster", ns).getChildren("host", ns);
public InputStream getDefaultResinConfContent()
{
return getClass().getResourceAsStream("/org/intellij/j2ee/web/resin/resin/resin31.conf");
}
原來的作者沒有開源,所以不好做進一步的修改完善,對于3.0的版本應該就不支持了。