apache 使用 Eclipse 进行 Java Web 开发 - 教程

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1060869/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-13 17:48:55  来源:igfitidea点击:

Java web development using Eclipse - Tutorial

javaeclipseapache

提问by moejoe11

I need some step by step tutorials/documents on developing Java web applications using Eclipse/apache.

我需要一些关于使用 Eclipse/apache 开发 Java Web 应用程序的分步教程/文档。

appreciate directions/help.

欣赏方向/帮助。

回答by cgp

I recommend you read a book instead:

我建议你读一本书:

This is probably the simplest way to get started. It really helped me with getting a grasp on how the directory structure and web.xml go together and make a web app. Eclipse is only a partner in your development, you really need to understand the underlying infrastructure no matter what framework you are using, and this book gives you a solid start.

这可能是最简单的入门方法。它确实帮助我掌握了目录结构和 web.xml 如何结合在一起并制作 Web 应用程序。Eclipse 只是你开发中的一个伙伴,无论你使用什么框架,你确实需要了解底层基础设施,而这本书给了你一个坚实的开始。

alt text

替代文字

回答by GregA100k

There are some video tutorials available at http://eclipsetutorial.sourceforge.net/

http://eclipsetutorial.sourceforge.net/ 上有一些视频教程

The first tutorial begins with the absolute basics of setting up a workspace and getting started. It also shows the Welcome screen available under the help menu which has links to an overview, samples, and tutorials

第一个教程从设置工作区和入门的绝对基础开始。它还显示了帮助菜单下的欢迎屏幕,其中包含指向概述、示例和教程的链接

回答by Mahesh

As you've already installed Apache Tomcat. I assume you've not installed Java EE tools for Eclipse. If not, then First download Eclipse Java EE tools from Help > Software Updates > Available Software > Java EE developer Tools.

因为您已经安装了 Apache Tomcat。我假设您还没有为 Eclipse 安装 Java EE 工具。如果没有,则首先从帮助 > 软件更新 > 可用软件 > Java EE 开发人员工具下载 Eclipse Java EE 工具。

First way :is using Tomcat plugin with eclipse,for that you've to check this tutorial

第一种方法:在 Eclipse 中使用 Tomcat 插件,为此您必须查看本教程

Second way:If the Tomcat Plugin is not working with you then other alternative as follow Click on Click Window in menu> Preferences then click Serverpane. Open Runtime Requirement pane. Add path for the tomcat directory. Click Ok. You're done with the settings.

第二种方式:如果 Tomcat 插件不能与您一起使用,那么其他替代方法如下单击“单击菜单”>“首选项”中的“窗口”,然后单击“服务器”窗格。打开运行时要求窗格。添加 tomcat 目录的路径。单击确定。您已完成设置。

Now you can create new projects from File >New >Projects. And start building servlets/jsp projects. Try learning from good books like "Head first: Servlets & JSP".

现在您可以从文件 > 新建 > 项目创建新项目。并开始构建 servlets/jsp 项目。尝试从“Head first: Servlets & JSP”之类的好书中学习。

Hope this helps.

希望这可以帮助。

回答by duffymo

Reminds me of that old joke:

让我想起那个老笑话:

Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems.

有些人在遇到问题时会想“我知道,我会使用正则表达式”。现在他们有两个问题。

Sounds like you have several things that you don't know: Eclipse, Tomcat, Java EE development, maybe JSPs, JSTL, WAR files, the list goes on.

听起来您有几件事不知道:Eclipse、Tomcat、Java EE 开发,也许还有 JSP、JSTL、WAR 文件,不胜枚举。

My advice would be to strip things down to the bare bones and decompose the problem a bit.

我的建议是将事情剥离到裸露的骨头并稍微分解问题。

Start by doing a simple servlet/JSP app talking to a database, without using Eclipse. See if you can compile on the command line, create the WAR file, package it properly, and deploy it on Tomcat.

首先做一个与数据库对话的简单 servlet/JSP 应用程序,而不使用 Eclipse。看看能不能在命令行编译,创建WAR文件,正确打包,部署到Tomcat上。

If you can manage that, then work Eclipse into the mix. Don't worry about running Tomcat inside Eclipse at first. You can go back and forth until the IDE is comfortable.

如果您能做到这一点,那么将 Eclipse 融入其中。一开始不要担心在 Eclipse 中运行 Tomcat。您可以来回切换,直到 IDE 舒适为止。

But you're asking a lot when you say you'd like step by step instructions. You're tackling a very big problem.

但是当你说你想要分步说明时,你问了很多。你正在解决一个非常大的问题。

回答by Mark Renouf

When you first start Eclipse there is a screen with tutorials right in the program. They are also accessible from the Help menu

当您第一次启动 Eclipse 时,程序中会出现一个带有教程的屏幕。也可以从“帮助”菜单访问它们

回答by Nizar Grira

DZone REFCARZ might be helpful, there's one for eclipse: Getting Started with Eclipse

DZone REFCARZ 可能会有所帮助,eclipse 有一个: Getting Started with Eclipse