Originally posted by Michael Huber:
Hey, I got a quick question about JSP. JSP is basically java code embedded in HTML tags right?
so the big difference between Applets and JSP is that with Applets you can use GUI's but with JSP you basically use it for displaying information that can be manipulated by java
Is that correct?
Sort of. JSP's are not just java code embedded in HTML tags though. A good programmer won't put *any* java code in a JSP. A JSP is just a template for what the ending HTML will be. A request is sent to the server for the JSP. The server takes the JSP and replaces the dynamic portions with static values and sends the request back to the client browser as HTML.
Applets are Java GUI's that run inside a web page using Swing and/or AWT. All actions take place on the client PC. So for example, if I click a button in an Applet, the code on my computer (1 or more cached JAR files presumably) executes the action. On the other hand, if I click a button on a JSP, a web server somewhere must handle that request.
Just think of it in terms of the difference between running a desktop application and viewing a web page. That's all it really is.