I know that J2EE can be used for JSP + Servlets. However, can I use J2SE for JSP & Servlets?
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With