I’m trying to learn how to create dynamic websites using Glassfish (a Java application server). I’m an advanced PHP programmer and a pretty good Java programmer, but I’ve never looked into using Java as the serverside part of a web page.
I’ve heard the terms “JSP” (Java Server Page) and “Servlet” thrown around. What’s the difference? Which does Glassfish use? Is there an advantage to one over the other?
Also, if you have any recommendations for tutorials or learning methods, I’d appreciate the links. Thanks!
JSP is comparable to PHP pages as there is a mix of Java and HTML/CSS etc. Servlets are pure Java classes. Internally JPS are compiled to Servlets. Glassfish can use both.
Advantages to JSP is that you could put HTML in them. That is also a disadvantage as it can be misused.