You need to check that the context-root element for the web module in the application.xml file that s in the META-INF directory of your EAR has been correctly changed.
这方面的一个例子是:
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:application="http://java.sun.com/xml/ns/javaee/application_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd"
id="Application_ID" version="6">
<display-name>TestProject</display-name>
<module>
<web>
<web-uri>TestProjectWeb.war</web-uri>
<context-root>testproject</context-root>
</web>
</module>
<module>
<ejb>TestProjectEJB.jar</ejb>
</module>
</application>
举例来说,网络模块应在你所部署的服务器的测试项目下提供,例如:。
(In case you would like to deploy to the root of your server, you can leave the context-root element empty: <context-root></context-root>
.)
如果你确实看到你在Netbeans的行动正确改变了这一档案,那么它可能像BalusC指出的部署问题。 检查欧洲重建机构部署的地点,并人工检查所部署版本是否也具有正确价值。