This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes diff  b/w servlet&jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "diff  b/w servlet&jsp" Watch "diff  b/w servlet&jsp" New topic
Author

diff b/w servlet&jsp

anshu sahai
Greenhorn

Joined: Jun 01, 2006
Posts: 6
Hi can some one tell me the diff b/w servlet&jsp other than presentataion &business layer .

thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60785
    
  65

This gets asked a lot. Please search the forum for previous discussions.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
pawank gupta
Ranch Hand

Joined: Jun 07, 2006
Posts: 34
taglib
run time function
scripting
runtime changes reflection
mohan kumar r
Ranch Hand

Joined: Jan 19, 2006
Posts: 38
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


mohan
Orem Hun
Greenhorn

Joined: May 24, 2005
Posts: 28
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

Joined: Jan 10, 2002
Posts: 60785
    
  65

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

Joined: Jun 01, 2006
Posts: 6
thanx a lot
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: diff b/w servlet&jsp
 
Similar Threads
diff b/w Throw and Throws
Reg:JSPBean
Diff b/w jsp and servlet
Cookies
diff b/w doGet() and servlet()