Converting a Java Project to a Dynamic Web Project in Eclipse
来源:互联网 发布:淘宝店铺在线装修 编辑:程序博客网 时间:2024/05/24 05:22
From:http://eclipse.dzone.com/tips/converting-java-project-dynami
To convert a Java Project to a Web Project switch to or open the Resource Perspective of the project, in the root of the project. Open the .project file and make sure the builders and natures are present that are needed for a web project. See the example below, the name should be the name of your project, the most important nodes are the nature children in the natures node:
<?xml version="1.0" encoding="UTF-8"?><projectDescription><name>eezyjy_lcms</name><comment></comment><projects></projects><buildSpec><buildCommand><name>com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder</name><arguments></arguments></buildCommand><buildCommand><name>org.eclipse.jdt.core.javabuilder</name><arguments></arguments></buildCommand><buildCommand><name>com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator</name><arguments></arguments></buildCommand><buildCommand><name>com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator</name><arguments></arguments></buildCommand><buildCommand><name>org.eclipse.wst.validation.validationbuilder</name><arguments></arguments></buildCommand></buildSpec><natures><nature>com.genuitec.eclipse.j2eedt.core.webnature</nature><nature>org.eclipse.jdt.core.javanature</nature><nature>org.eclipse.jem.workbench.JavaEMFNature</nature><nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature><nature>org.eclipse.wst.common.project.facet.core.nature</nature><nature>org.eclipse.wst.jsdt.core.jsNature</nature></natures></projectDescription>
Once you’ve updated the .project file you can close the file and right click and choose properties on the project. When the properties window opens click on Project Facets. The Facets grid is probably empty, click the Modify Project button. Check the Dynamic Web Module and Java Facets, choose the Java and Servlet version that applies to your project. Click Next and specify the existing or new location of your src and web content directories. Click Finish.
As a final step I would recommend modifying the build path to compile your source directly into your /WEB-INF/classes directory by selecting Java Build Path and modifying the Default output directory.
Now you should be able to create a local tomcat server, or if you’ve already created one you should be able to add the project to the server by right clicking the server and choosing Add and Remove Projects.
- Converting a Java Project to a Dynamic Web Project in Eclipse
- Java - How to change context root of a dynamic web project in eclipse
- How to change context root of a dynamic web project in Eclipse
- Eclipse:Java type project to Dynamic Web Project
- Convert a Maven Java Project to a Web Project
- Converting a project from a waterfall to an iterative approach
- Eclipse:Java type project to Dynamic Web Project,并发布到Tomcat
- 在Eclipse中将Java Project转换成Dynamic Web Project
- Eclipse 中 将Java Project 转换为Dynamic Web Project
- Eclipse中将Java Project转换成Dynamic Web Project
- Eclipse中将Java Project转换为Dynamic Web Project
- Eclipse 中 将Java Project 转换为Dynamic Web Project
- 在Eclipse中将java Project转换成Dynamic Web Project
- ECLIPSE 中 将JAVA PROJECT 转换为DYNAMIC WEB PROJECT
- Eclipse 中 将Java Project 转换为Dynamic Web Project
- 在Eclipse中将java Project转换成Dynamic Web Project
- Eclipse jee中将Java Project转换成为Dynamic Web Project
- 在Eclipse中将java Project转换成Dynamic Web Project
- windows 7的SYSTEM权限
- Android 强制设置横屏或竖屏 设置全屏
- android Monkeyrunner:Python语法知识学习(for,while,if用法实例)
- 原生Eclipse下Java服务器调试的一个问题
- 如何成为明星开发人员?
- Converting a Java Project to a Dynamic Web Project in Eclipse
- Android-NDK开发之第三个例子--传递整型数组
- javascript DOM操作基础
- Socket聊天
- 金山(Kingsoft)笔试面试题整理之008
- Android-NDK开发之第三个例子--传递字符串数组和中文乱码问题
- asp.net c# 打开新页面或页面跳转
- Linux下安装net snmp
- Robotium_使用robotium进行自动化测试