找到.project文件,找到里面的<natures>标签,查看是否有下面的代码


  北京哪有代还信用卡【电话/微信:135-2093-5605】北京代还信用卡、北京VISA卡套现、积分POS机◆长期有效◆欢迎来电咨询办理!用Eclipse开发项目的时候,把一个Web项目导入到Eclipse里会变成了一个java工程,将无法在Tomcat中进行部署运行。
  方法:
  1.找到.project文件,找到里面的<natures>标签,查看是否有下面的代码,没有则复制进去。
  Xml代码
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
  注:Java项目中只有下面一句:
  Xml代码
<nature>org.eclipse.jdt.core.javanature</nature>
1、What is Velocity?

Velocity is a Java-based template engine. It permits anyone to use a simple yet powerful template language to reference objects defined in Java code.

When Velocity is used for web development, Web designers can work in parallel with Java programmers to develop web sites according to the Model-View-Controller (MVC) model, meaning that web page designers can focus solely on creating a site that looks good, and programmers can focus solely on writing top-notch code. Velocity separates Java code from the web pages, making the web site more maintainable over its lifespan and providing a viable alternative to Java Server Pages (JSPs) or PHP.
Velocity's capabilities reach well beyond the realm of the web; for example, it can be used to generate SQL, PostScript and XML from templates. It can be used either as a standalone utility for generating source code and reports, or as an integrated component of other systems. For instance, Velocity provides template services forvarious web frameworks, enabling them with a view engine facilitating development of web applications according to a true MVC model.



Velocity是一个基于java的模板引擎(template engine)。它允许任何人仅仅简单的使用模板语言(template language)来引用由java代码定义的对象。

当Velocity应用于web开发时,界面设计人员可以和java程序开发人员同步开发一个遵循MVC架构的web站点,也就是说,页面设计人员可以只 关注页面的显示效果,而由java程序开发人员关注业务逻辑编码。Velocity将java代码从web页面中分离出来,这样为web站点的长期维护提 供了便利,同时也为我们在JSP和PHP之外又提供了一种可选的方案。

Velocity的能力远不止web站点开发这个领域,例如,它可以从模板(template)产生SQL和PostScript、XML,它也可以被当 作一个独立工具来产生源代码和报告,或者作为其他系统的集成组件使用。Velocity也可以为Turbine web开发架构提供模板服务(template service)。Velocity+Turbine提供一个模板服务的方式允许一个web应用以一个真正的MVC模型进行开发。  2.刷新导入的项目
  3.在项目上点击右键,进入Properties配置,点击Project Facets,再点击Convert to faceted form进入属性设置:
  
  4.勾选Dynamic Web Module和Java,选择相应的版本,并点击下方出现的Further configuration available:
  http://pp.163.com/bjshq/pp/18232051.html
http://pp.163.com/bjshq/pp/18232050.html
http://pp.163.com/bjshq/pp/18232049.html
http://pp.163.com/bjshq/pp/18232048.html
http://pp.163.com/bjshq/pp/18232047.html
http://pp.163.com/bjshq/pp/18232046.html
http://pp.163.com/bjshq/pp/18232045.html
  5.修改eclipse默认的WebContent为WebRoot,并根据自己需要勾选Generate web.xml deployment deor:
  新功能:
增加SSDT-BI项目模板,用于分析服务、报告服务和集成服务,且在Visual Studio 2015中支持
新增在SSIS DataFlow中对Microsoft SQL Server 2016的支持
在OracleSqlStatementCollection中实现IEnumerable, ICollection和IList三种接口
Oracle 10g及更高的替代引用字符常量将在OracleScript中支持了
性能使用默认值(改为8192),PacketSize可直接通过VPN连接模式
CLOB插入数据性能的改善
对于Entity Developer的改进:
现支持Entity Framework Core 1.0 RTM
利用存储过程中参数设置获取的的元数据来自动生成相对应的较为复杂的类型
现在ObservableCollection导航属性的初始化被默认为构造函数(实体框架模型)
对于Entity Framework的改进:
支持Entity Framework Core 1.0 RTM
在Entity Framework Core支持中实现OracleConventionSetBuilde类
SqlFunctions.DatePart方法支持年,月,日,小时,分钟,秒,毫秒等修饰符
EF4, EF5, EF6中实现OracleCSharpMigrationCodeGenerator和OracleVisualBasicMigrationCodeGenerator的代码迁移
实现在EF6 Code-First迁移中的CreateTable操作,创建OracleColumnAnnotations类自定义列
  
  5.点击OK-->Apply应用设置,Java项目即转换为了Web项目。
  注:如果忘记点击Further configuration available,即忘记修改WebContent为WebRoot,
  可以点击Deployment Assembly选项,然后将WebContent删除,将WebRoot添加进去。
  
  
  图示:
  创建或导入:
  
  修改中:
  
  修改完成:
  
  在Tomcat中运行:
  
  注:
  新建Web项目的步骤相同,唯一的区别在于:
  若要设置WebRoot,只能在Further configuration available中设置,
  不能在Deployment Assembly中设置。

猜你喜欢

转载自xp71013931zh.iteye.com/blog/2323687