[英]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.