Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is a LAMJ stack a possible environment? [closed]

Tags:

java

php

lamp

Is it possible to use Java instead of PHP with Linux, Apache and MySQL?

like image 965
mhuxmitmuma Avatar asked Jul 07 '15 13:07

mhuxmitmuma


1 Answers

the 'LAMP' stack is not some special thing, only that there is a lot of support in the form or frameworks etc based on it. There is no problem to create an application based on Linux, Apache, MySQL and Java (LAMJ) but it will have totally different benefits and drawbacks than LAMP because Java is so totally different from PHP.

Where MySQL used to be the database of choice for Java developers I believe that has now shifted towards PostgreSQL. Some folk like NoSQL databases like MongoDB but that really ties into the Java frameworks you want to use. Also you need some sort of web container to run your Java web application in. The most popular is still a web server like Tomcat I think, you could also use Jetty. For larger projects requiring more extensive application management support and clustering you could consider Glassfish or JBoss.

Maybe you should consider an LTPJ stack (Linux Tomcat PostgreSQL Java). I think that will give you more joy in the way of community support.

EDIT: 2019 update. In my perception the 'standard' has shifted to Spring Boot, with which you can run a web application as a standalone jar using an embedded Tomcat instance. Spring Boot offers a lot of out of the box support like Spring Actuator for management endpoints (e.g. application health).

like image 120
Adriaan Koster Avatar answered Oct 08 '22 15:10

Adriaan Koster