简体   繁体   English

我可以在Ubuntu 14.04上开发Java Web应用程序并使用我的Apache服务器查看它们吗?

[英]Can I Develop Java Web Applications On Ubuntu 14.04 And Use My Apache Server To View Them?

这听起来像是一个noobie问题,但我只想知道如何在ubuntu上安装Java,Apache是​​否支持Java Web应用程序以及我需要其他哪些资源。

Apache isn't typically used to run Java applications. Apache通常不用于运行Java应用程序。

If you want the Apache project most typically used for Java on the web, you should take a look at Tomcat . 如果您想要Web上最常用于Java的Apache项目,则应该看看Tomcat Tomcat is it's own web server, separate from Apache. Tomcat是它自己的Web服务器,与Apache分开。

In some configurations, Apache is used in front of or besides an install of Tomcat to serve static content; 在某些配置中,Apache在安装Tomcat之前或之外用于提供静态内容。 images, for example. 例如图像。

For installing Tomcat on Ubuntu, it should be pretty easy: 要在Ubuntu上安装Tomcat,这应该非常简单:

sudo apt-get install tomcat7

Then check http://localhost:8080 , which is where it serves by default. 然后检查http:// localhost:8080 ,这是默认服务。

First check that java is not already installed by typing "java -version" in a console. 首先在控制台中键入“ java -version”,以检查是否尚未安装Java。 If java is installed it will print out the version. 如果安装了java,它将打印出版本。 To install java run the following 要安装java,请运行以下命令

sudo apt-get update
sudo apt-get install default-jdk

This will install openJDK. 这将安装openJDK。

There are many web application frameworks you can use with Java. 您可以将Java与许多Web应用程序框架一起使用。 One of the more popular ones is the play framework. 游戏框架是最受欢迎的游戏框架之一。 you can grab it here https://www.playframework.com/ 您可以在这里https://www.playframework.com/获取

and there are installation instructions for Apache here https://www.playframework.com/documentation/2.0/HTTPServer 并且在这里有Apache的安装说明https://www.playframework.com/documentation/2.0/HTTPServer

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么我不能使用Ubuntu编译Java应用程序? - Why can't I compile my Java applications using Ubuntu? 使用 HTML 开发桌面应用程序视图,作为 Web 应用程序 - Develop desktop applications view with HTML, as a web application 我需要编写基于Java的Web应用程序并在个人计算机上对其进行测试,我需要什么? - What do I need to write Java-based web applications and test them on my personal computer? 如何有效地开发Java Web应用程序? - How to develop Java Web applications efficiently? 从哪里可以得到用Java EE开发的任何示例Web应用程序,以便向他们学习? - From where can I get any example web applications developed in Java EE in order to learn from them? 如何使用apache或tomcat服务器在docker中运行java应用程序 - How can i run java applications in docker using apache or tomcat server 如何使用Tomcat Apache Server 9(如IIS)为多个域(Java应用程序)提供服务 - How can I serve Multiple Domains (Java applications) with Tomcat Apache Server 9 (Like IIS) 如何在我的PHP和Java / Play Framework应用程序之间共享一个Apache实例? - How can I share one Apache instance between my PHP and Java / Play Framework applications? 我可以使用 CLI 为 android 应用程序开发吗 - Can I develop for android applications by using CLI 我如何使用内部应用服务器开发Spring Web应用程序? - How i can develop spring web application with application server inside?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM