• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP Vs Servlets  RSS feed

 
PRAVEEN M
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any thing like we can do with only JSP's, which we can not do with servlets?
Can any one explain about the significance of jsp's over servlets?
 
a young
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSP is used when you have a lot of HTML to output. Doing that w/ servlets would be a real pain using out.write(). There's nothing that JSP can do that servlets can't. You might what to check out this other thread on the topic:
http://www.coderanch.com/t/279833/JSP/java/JSP-VS-SERVLETS
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm hearing a lot of people profess JSPs should have NO Java statements in them, only HTML and taglibs. Two reasons: 1) JSPs can be authored by HTML experts with a little training in tags, zero training in Java. 2) Once you allow Java you're headed down the slippery slope of business logic in your presentation.
Waddya think?
 
a young
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with that. I think JSP files should have little actual code. I try to stick with JSP files calling servlets and beans only.
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the JSP forum.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!