tags:

views:

102

answers:

3

I know that J2EE can using JSP + Servlet, can I use JSP & Servlet using J2SE?

+2  A: 

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

To be clear: you don't necessarily need to download the Java EE from Sun to be able to develop webapps on Tomcat. Just the Java SE JDK is enough. The Java EE is nothing else than Sun's own (reference) implementation of the abstract Java EE specification, bundled with under each the Netbeans IDE.

BalusC
+4  A: 

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

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. I suspect that's what you're after.

Brian Agnew
A: 

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

JCasso