• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP question  RSS feed

 
Michael Huber
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
thanks
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to the JSP forum...
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
thanks


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.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!