English 中文(简体)
我如何改变我的企业项目的背景道路
原标题:How do I change the context path of my Enterprise Project

因此,我的企业项目名称 试验项目,其中包含 试验项目-ejb 试验项目-war,因此,当我管理该项目时,该项目的名称与locahost:80/《试验项目-war一样。 我怎样才能将这一标题改为<代码> 当地东道:8080/testproject。 我使用净豆6.9,试图在以下条目上点击: 试验项目-war在净贝里的夹,并具体说明在<代码>Run下所处的环境区,但它仍然装上<代码>locahost:80/ 试验项目-war。

最佳回答

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指出的部署问题。 检查欧洲重建机构部署的地点,并人工检查所部署版本是否也具有正确价值。

问题回答

正如Harry指出,默认项目模板没有创建application.xml文档,因此,你必须用手提$ ENTERPRISE_APP_PATH/src/conf

在把同一事项混为一谈的过程中,就谈了这个问题。 由于欧佩组织要求Netbeans这样做,请允许我补充先前的答复,具体描述如何利用Netbeans IDE来做到这一点。

有了Netbeans 8(可能还有较早版本),你可以告诉民主选举学会,为你们创建申请。 标注企业应用项目(例如,在OP中,这将是“试验项目”,选择“新”项目,然后选择“快速部署说明”。 这将产生“申请编号xml”文档,并将其放在贵国Netbeans项目的适当位置。 然后,你可以轻而易举地把这一档案确定为你想要的东西。





相关问题
Netbeans CVS - existing repo - existing working copy

I m using Netbeans to develop with Drupal. I m trying to let Netbeans get drupal core and modules from the repository on drupal.org to my local working copy. Problem is: I already have a working ...

Java Library and Class Path Problems

Quick personal background: I was hired a few months ago as the sole .NET developer (C#) by a company whose other devs are all php devs. A week into the job I was told they wanted to switch to Java ...

Privileged operations in netbeans mobility

I m writing a Java ME app that will use privileged operations such as messaging. By default the user is prompted to confirm each of these operations, but I would like to run it as a background ...

Running unit tests on both windows and linux

Is there a way, a method, to be able to effectively run unit tests (phpunit) on both linux and windows? I need to do this because some parts of the system is only available under linux, but i do want ...

Dependency bundle (jar-files/sources/API docs) in Eclipse

I m developing various in-house extensions for JIRA, the issue tracker we use. So far I worked with Netbeans and everything worked like a charm. However, now I need to switch to Eclipse and I m ...

热门标签