By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,665 Members | 1,761 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,665 IT Pros & Developers. It's quick & easy.

When u use html, whenu use servlet, when u use jsp

sanjay123456
100+
P: 125
Hello friend ,

When u use html, whenu use servlet, when u use jsp ?


sanjay
Jan 22 '07 #1
Share this Question
Share on Google+
3 Replies


10K+
P: 13,264
Hello friend ,

When u use html, whenu use servlet, when u use jsp ?


sanjay
Generally

Use HTML for static pages whose contents do not change. HTML pages load faster and you should take advantage of this feature for pages that do not require any dynamic content from a database.

A JSP is compiled client-side and so takes longer to load than an HTML page. Use a JSP for displaying dynamic content changed from a database. JSPs use Java language statements and so can be used to do things that can be done by a standard Java program. Always remeber that a JSP page is compiled on the server evrytime it is loaded or refreshed so if the contents of a database change, then the JSP is capable of displaying these changes.

A servlet is loaded once on the server. Use it to perform logical operations and code extensive operations. Servlets should be used to control the behaviour of the application and to process requests from clients from HTML or JSP pages.
Jan 22 '07 #2

sanjay123456
100+
P: 125
Dear r035198x

thx for Answer .

sanjay
Jan 23 '07 #3

10K+
P: 13,264
Dear r035198x

thx for Answer .

sanjay
It was a very general answer. You should read more about MVC e.t.c to fully grasp their applications.
Jan 23 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.