Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

difference

 
gaurav chhabra
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the very basic diff beteween a SERVLET snd a JSP
thank you
Gaurav
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Servlets are Java classes. They allow Java programmers to work in a "Java" environment.

JSPs are files that get compiled into Java classes on the fly. Their appearance is more like ASP, or PHP than like Java source files.
They allow web designers to work in an "HTML" like environment.

<opinion>
It's the power to combine the two that makes Server Side Java vastly superior to everything that came before it.
</opinion>
[ January 19, 2005: Message edited by: Ben Souther ]
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some teams use a standard of "No Java in JSPs" and "No HTML outside JSPs". This sounds harsh, but helps you focus on separation of concerns. It still leaves you CSS, JavaScript and tags to play with for fancy rendering.
 
Jim Chrystal
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A JSP is a servlet.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic