DNB5brims
DNB5brims

Reputation: 30648

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?

Upvotes: 4

Views: 13241

Answers (3)

Brian Agnew
Brian Agnew

Reputation: 272427

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.

Upvotes: 10

BalusC
BalusC

Reputation: 1109695

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.

Upvotes: 12

JCasso
JCasso

Reputation: 5523

Servlet API is included both in Java EE and Java SE. So you can use it with Java SE. You will also need an application server.

Java application servers: http://en.wikipedia.org/wiki/Application_server#Java_application_servers

Upvotes: 0

Related Questions