`

The selection is not within a valid module.

 
阅读更多

为了进行不同的版本设置,类似 myweb1.0,myweb 1.1等。

一般做法为:

1、在eclipse workspace中拷贝一份,如拷贝 myweb 1.0,然后更改项目名为 myweb1.1。

2、在workspace 中导入myweb1.1,在tomcat下运行。

此时,出现问题: The selection is not within a valid module.

 

原因:导入的工程名和配置中的工程名不一致,只是修改了项目文件夹名为myweb1.1,并没有改配置中的工程名。

解决方法:

1、到Eclipse工程目录下找到相应的org.eclipse.wst.common.component文件 (workspace\MyWeb 1.0\.settings\org.eclipse.wst.common.component) ,用记事本打开,发现:

 

<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
    <wb-module deploy-name="MyWeb 1.0">
        <wb-resource deploy-path="/" source-path="/WebContent"/>
        <wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
        <property name="context-root" value="MyWeb"/>
        <property name="java-output-path"/>
    </wb-module>
</project-modules>

  

其中:配置项 wb-module deploy-name 仍然为 MyWeb 1.0

 

2、将其修改为导入的工程名 MyWeb 1.1

<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
    <wb-module deploy-name="MyWeb 1.1">
        <wb-resource deploy-path="/" source-path="/WebContent"/>
        <wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
        <property name="context-root" value="MyWeb"/>
        <property name="java-output-path"/>
    </wb-module>
</project-modules>

  

 最终,问题得到解决。

分享到:
评论

相关推荐

    关于eclipse发布web项目中遇到的问题

    在发布项目时,可能会出现“Project facet Dynamic Web Module version3.0 is not supported”的错误信息。这是因为 Eclipse 工作目录下的项目文件中,org.eclipse.wst.common.project.facet.core.xml 文件中的 jst....

    Computational.Intelligence.and.Feature.Selection.Rough.and.Fuzzy.Approaches

    Wiley.IEEE.Press.Computational.Intelligence.and.Feature.Selection.Rough.and.Fuzzy.Approaches.Sep.2008.eBook-DDU.pdf

    FlexGraphics_V_1.79_D4-XE10.2_Downloadly.ir

    connector's end point moving, the link is breaks if the move was not on one of the flex-controls connection points. Contain False as default. - ADD Added ControlDocRect parameter in event ...

    selection-0.0.21.tar.gz

    标题中的"selection-0.0.21.tar.gz"是一个典型的软件版本压缩包,它采用的是tar和gzip两种工具进行的打包和压缩。这个文件名表明这是一个名为"selection"的项目,版本号为"0.0.21",并且已经通过gzip进行了压缩。在...

    PyPI 官网下载 | rpi_feature_selection_toolbox-2.0.4.tar.gz

    **PyPI 官网下载 | rpi_feature_selection_toolbox-2.0.4.tar.gz** 在Python编程领域,PyPI(Python Package Index)是官方的第三方软件包仓库,它为开发者提供了一个平台来分享和安装Python模块。"rpi_feature_...

    SSD7 选择题。Multiple-Choice

    The degree of a table is the number of _____ in the table. (a) keys (b) columns (c) rows (d) foreign keys Correct answer is (b) Your score on this question is: 10.00 Feedback: (b) ...

    Python库 | rpi_feature_selection_toolbox-2.1.1.tar.gz

    资源分类:Python库 所属语言:Python 资源全名:rpi_feature_selection_toolbox-2.1.1.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059

    微软内部资料-SQL性能优化5

    For example, if the clustered index is on (lastname, firstname) and a nonclustered index is on firstname, the firstname value will not be duplicated in the nonclustered index leaf rows. Note The ...

    S7A驱动720版本

    in the demo mode, or the value 1, when the driver has found a valid key, and therefore is licenced. This function is also available via the OPC server interface. The same item-ID address format has...

    (2008)A_Case-Based_Approach_for_Action_Selection_and_Coo

    features in the action selection problem of a team of robots. Moreover, we are also interested in obtaining a cooperative behavior among robots to successfully perform joint tasks. Thus, we include ...

    深入Go Module.pdf

    MVS(Minimal Version Selection)是最小版本选择算法,由Russ Cox提出,用于确定构建main module时每个依赖的最小满足版本。在处理replace、exclude、upgrade和downgrade时,MVS算法会动态调整依赖关系,确保所有...

    国民技术MCU芯片选型-Selection Guide 2023-4_CN.pdf

    国民技术MCU芯片选型-Selection Guide 2023-4_CN.pdf

    2018 The-Theory-of-Quantum-Information.pdf

    This is a book on the mathematical theory of quantum information, focusing on a formal presentation of definitions, theorems, and proofs. It is primarily intended for graduate students and researchers...

    PyPI 官网下载 | rpi_featureSelection_python_tools-2.0.13.tar.gz

    标题中的"PyPI 官网下载 | rpi_featureSelection_python_tools-2.0.13.tar.gz"指的是一款名为`rpi_featureSelection_python_tools`的Python库,版本为2.0.13,该库是以`.tar.gz`格式在Python的包索引平台PyPI上发布...

    Excel 三级 联动 下拉框 宏代码 实例

    tempStr = Trim(Cells(i, firstDrawBoxColumn + 1)) 'Find out the options for second draw box, it is seperated by , Cells(Target.Row, Target.Column + 1).Select ' Fill the validation to second draw box ...

    EHLib 6.3.171〖D7~XE5〗

    - When the current cell in the grid is on the last line, the Tab key on the grid translates the input focus to the next TabStop Control of a Form (dgvhTabToNextRowEh property must be included). ...

    Randomized Experiments from Non-random Selection in U.S.,.pdf

    David S. Lee:Randomized Experiments from Non-random Selection in U.S. House Elections._ Journal of Econometrics,

    TIA博途选型工具Selection Tool的基本使用方法介绍.docx

    TIA博途中的Selection Tool是一款非常实用的选型辅助工具,帮助用户快速准确地选择适合的自动化组件,如控制器、I/O模块、通信模块等。下面我们将详细介绍这款工具的基本使用方法。 首先,你需要下载TIA博途选型...

    Python库 | rpi_featureSelection_python_tools-2.0.16.tar.gz

    "rpi_featureSelection_python_tools-2.0.16.tar.gz" 是一个针对Python的库,特别关注特征选择(feature selection)这一关键环节。 特征选择是数据分析过程中的一个重要步骤,它涉及到从原始数据集中选择最有影响...

Global site tag (gtag.js) - Google Analytics