NetBeans4.1でSun Java System WS6.1にデプロイ
さて、今日はちょっとしたTipsを御紹介します。
NetBeansで開発をしていてSun Java System Web Server 6.1(AppServer7.x)に
Webアプリケーションをデプロイしたいという方はいないでしょうか?
NetBeans4.1で正式にサポートされているサーバは下記です。
NetBeansサーバプラグインより
- Java.net GlassFish Java EE 5 server (the Open Source Reference Implementation and production quality for Java EE 5 specification)
- Sun Java System Application Server 8.1 (A free J2EE 1.4 compliant application server from Sun)
- JBoss 4
- WebLogic 9
- WebSphere 6
私は、過去の案件でWeb Server6.1にデプロイをしたいという状況がありました。
その際、NetBeans4.1ではデフォルトでWS6.1が対応していなかった為、
自分でsun-web.xmlファイルを変更しました。
web/WEB-INFディレクトリ配下にsun-web.xmlファイルがあります。
これを、下記のようにsun-web-app_2_3-0.dtdベースに変更してみてください。
すると、NetBeans4.1でもWebServer6.1上に問題なくデプロイさせ動作させる
ことができます。
<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE sun-web-app PUBLIC “-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Servlet 2.3//EN” “http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_3-0.dtd”>
<sun-web-app>
<context-root>/webapp</context-root>
<class-loader delegate=”true”/>
<jsp-config>
<property name=”classdebuginfo” value=”true”>
<description>Enable debug info compilation in the generated servlet class</description>
</property>
<property name=”mappedfile” value=”true”>
<description>Maintain a one-to-one correspondence between static content and the generated servlet class’ java code</description>
</property>
</jsp-config>
</sun-web-app>
Entry filed under: Java.