zoukankan      html  css  js  c++  java
  • eclipse或Myeclipse中web项目没有run on server时怎么办?

    文章转载至:http://blog.csdn.net/hongchangfirst/article/details/7722703

    web项目没有run on server

    1、首先确保正确安装Tomcat和JDK。(eclipse要确保eclipse是javaee版本的,或者已经安装看wtp插件 )

      Tomcat安装参考:http://jingyan.baidu.com/article/4853e1e53465271909f72690.html

    2、找到对于web项目的文件夹,打开文件夹下.project文件

    3、查看.project文件是否包含以下文件,如果没有添加进去,修改后保存文件。

       在 <natures> </natures>中加入 

    复制代码
    <natures>
            <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
            <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
            <nature>org.eclipse.jdt.core.javanature</nature>
            <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
            <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
        </natures>
    复制代码

      在 <buildSpec> </buildSpec>中加入 

    复制代码
    <buildSpec>
            <buildCommand>
                <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
                <arguments>
                </arguments>
            </buildCommand>
            <buildCommand>
                <name>org.eclipse.wst.common.project.facet.core.builder</name>
                <arguments>
                </arguments>
            </buildCommand>
            <buildCommand>
                <name>org.eclipse.jdt.core.javabuilder</name>
                <arguments>
                </arguments>
            </buildCommand>
            <buildCommand>
                <name>org.eclipse.wst.validation.validationbuilder</name>
                <arguments>
                </arguments>
            </buildCommand>
        </buildSpec>
    复制代码

    4、刷新web项目,在项目->右击->Properties->Project Facets->Modify Project,选择Java和Dynamic Web Module。点击ok关闭。

    5、此时再打开run as 应该就有Run on server了。

  • 相关阅读:
    NHibernate中session.update()及session.merge()的区别
    子序列 (All in All,UVa 10340)
    古老的密码 (Ancient Cipher,NEERC 2004,LA 3213)
    例题1 勇者斗恶龙 (The Dragon of Loowater,UVa 11292)
    HDU1869 六度分离
    B. T-primes
    PoJ 1595 PrimeCuts
    poj 3518 Prime Gap
    PKU1988磁铁
    求组合数
  • 原文地址:https://www.cnblogs.com/dybk/p/7804824.html
Copyright © 2011-2022 走看看