Reputation: 3146
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!
Upvotes: 1
Views: 1921
Reputation: 750
JSP may be the closest to PHP indeed but I'd like to encourage you to look at JSF, a component-orianted Model-View-Controler framework which is part of Java EE, the standard that GlassFish implements fully. There's also JAX-RS, another Java EE technology to expose Java object are RESTful resources. Both of them are built on top of the Servlet technology.
Upvotes: 0
Reputation: 8736
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.
Upvotes: 2