运行Dorado Web项目
在WAS CE实例中部署Dorado应用
1. 在server视图中右键单击WAS CE,选择Add and Remove Projects
2. 点击Add,部署Dorado应用到WAS CE中
3. 修改配置文件geronimo-web.xml
在对应位置加入下列代码中的红色字体部分
<?xmlversion="1.0" encoding="UTF-8"standalone="yes"?>
<web:web-appxmlns:conn="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2" xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2" xmlns:name="http://geronimo.apache.org/xml/ns/naming-1.2" xmlns:ejb="http://openejb.apache.org/xml/ns/openejb-jar-2.2" xmlns:pkgen="http://openejb.apache.org/xml/ns/pkgen-2.1" xmlns:app="http://geronimo.apache.org/xml/ns/j2ee/application-2.0" xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0" xmlns:web="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1" xmlns:pers="http://java.sun.com/xml/ns/persistence" xmlns:client="http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0">
<dep:environment>
<dep:moduleId>
<dep:groupId>default</dep:groupId>
<dep:artifactId>Sample</dep:artifactId>
<dep:version>1.0</dep:version>
<dep:type>car</dep:type>
</dep:moduleId>
<hidden-classes>
<filter>org.jaxen</filter>
</hidden-classes>
</dep:environment>
<web:context-root>/Sample</web:context-root>
</web:web-app>
运行Dorado应用
1. 在server视图中右键单击WAS CE,选择Start
2. 打开浏览器,输入http://localhost:8080/Sample,预览显示页面
结束语
WAS CE作为一个功能强大的开源J2EE应用服务器,为dorado提供了更多更全的技术支持,包括自定义服务器集合、EJB、更加完善的Web控制台、服务器插件等,这些特性为今后的Dorado项目开发提供了更为广阔的展现平台。