• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

diff b/w servlet&jsp

 
anshu sahai
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi can some one tell me the diff b/w servlet&jsp other than presentataion &business layer .

thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65122
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This gets asked a lot. Please search the forum for previous discussions.
 
pawank gupta
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
taglib
run time function
scripting
runtime changes reflection
 
mohan kumar r
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
first of all you need to know that servlets and JSPs are not complimentory technologies. a complex web application uses both.

1. servlets need to be configured in web.xml whereas in case of jsps no need.(exceptwelcome pages)
2.are u able to use custom tags in servlets?
3.there is only one stage b/w request and response but for jsps two stages:translation and compilation
 
Orem Hun
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSPs is implemented as a servlet internally. For example, Sample.jsp gets translated into Sample_jsp.java which is the equivalent servlet.

It's faster to develop JSPs as you can implement both HTML and Java in same file. As long as what you are doing in Java is too complicated, otherwise maintenance JSPs could be difficult.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65122
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Orem Hun:
It's faster to develop JSPs as you can implement both HTML and Java in same file.


As mentioned in other posts, mixing Java into the JSP is not considered a best practice. Creating a poor application structure because it is (supposedly) faster to develop that way is not a good idea.
[ June 24, 2006: Message edited by: Bear Bibeault ]
 
anshu sahai
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanx a lot
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic