Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can JavaSE be used to write a web application?

I know that J2EE can be used for JSP + Servlets. However, can I use J2SE for JSP & Servlets?

like image 493
DNB5brims Avatar asked Dec 14 '09 12:12

DNB5brims


2 Answers

No, you can't. You need both the Java SE and a JSP/Servlet implementation (a web container), such as for example Apache Tomcat or Oracle GlassFish (which is also part of the Oracle Java EE download).

To be clear: you don't necessarily need to download the whole Java EE thing from Oracle in order to be able to develop webapps on Tomcat. Just the Java SE JDK is enough. The Java EE download is actually nothing else than Oracle's own (reference) implementation of the abstract Java EE specification, better known as "GlassFish", bundled with some documentation, examples and optionally the Netbeans IDE.

like image 197
BalusC Avatar answered Sep 30 '22 05:09

BalusC


J2EE is a set of APIs. JSPs and servlets are technologies and APIs within the J2EE domain. So I think that this question is a little confusing.

People often use J2EE as shorthand for EJBs and application containers (WebSphere/WebLogic etc.). Instead you can run up a servlet container (e.g. Tomcat/Jetty etc.) which handles web technologies but little else, using the standard J2SE with (say) the Servlet API and nothing else. I suspect that's what you're after.

like image 39
Brian Agnew Avatar answered Sep 30 '22 06:09

Brian Agnew